primitives/@yashiel/mihcm-ui·v0.1.0·stable

Text

Type primitive. Type scale, weight, and tone — semantic tokens only.

Use cases

  • All on-screen text within MiHCM products.
  • Headings, body copy, captions, status messages.
  • Anywhere you'd reach for <p> or <span> and want consistent typography across web + native.

When NOT to use

  • For semantic headings (h1..h6 on web), wrap Text with the appropriate element. On native, the screen-reader role does the work.

Type scale

SizeUse case
xsCaptions, fine print, table footers
smSecondary copy, form helper text
baseDefault body text — 16px
lgLead paragraphs, prominent body
xlSubheadings
2xlSection headings
3xlPage section openers
4xlPage titles
5xlHero / display

Body line-length is best between 45–75 characters. The component does not enforce this; your container's max-w-prose should.

Tone

ToneUse when
defaultBody, neutral content.
mutedDe-emphasized supporting copy.
destructiveError / alert / delete-confirm copy.
successSuccess messages, positive metrics.
warningWarnings — pair with an icon, never color-only.

Tone is never the only signal. Pair destructive/warning text with an icon or label so colorblind users are not excluded.

  • Button — paired with text in CTAs.
  • Planned: Heading (semantic h1..h6 wrapper), Inline (inline-styled fragments).