Typography — headings, sizes, colours, weights, families, alignment, wrapping, and compound semantic styles. The size scale is absolute: one name, one size, everywhere.
Headings
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Font Sizes
No class = the 16px body default. Each text-* is one fixed size.
text-2xs — 10px
text-xs — 12px (badges, labels, captions)
text-sm — 14px (buttons, inputs, tables, tabs)
text-md — 15px (sidebar / nav items)
text-base — 16px (body default; same as no class)
text-lg — 18px
text-xl — 20px
text-2xl — 24px
text-3xl — 28px
text-4xl — 32px
Text Colour
Neutral
The quick brown fox — main text text-body
The quick brown fox — subdued text text-muted
Roles
The quick brown fox text-primary
The quick brown fox — the secondary role, not muted text-secondary
The quick brown fox text-success
The quick brown fox text-danger
The quick brown fox text-warning
The quick brown fox text-info
Colour slots
Colour slot 1 text-color-1
Colour slot 2 text-color-2
Colour slot 3 text-color-3
Colour slot 4 text-color-4
Colour slot 5 text-color-5
Colour slot 6 text-color-6
Colour slot 7 text-color-7
Colour slot 8 text-color-8
Colour slot 9 text-color-9
Text on Colour
text-on-* is the readable text colour on that background. surface-* sets both at once.
Roles — bg-{role} + text-on-{role}
Colour slots — bg-color-N + text-on-color-N
Weight & Style
The quick brown fox — 400 font-weight-normal
The quick brown fox — 500 font-weight-medium
The quick brown fox — 600 font-weight-semibold
The quick brown fox — 700 font-weight-bold
The quick brown fox font-style-italic
The quick brown fox font-style-normal
Font Family
The quick brown fox — OS UI font font-family-system
The quick brown fox — Helvetica / Arial font-family-sans
The quick brown fox — Georgia / Times font-family-serif
The quick brown fox — monospace font-family-mono
Alignment
Logical, RTL-aware.
Aligned text — leading edge text-start
Aligned text text-center
Aligned text — trailing edge text-end
Wrapping
Each box is 25rem wide (wr-25).
Default — wraps
text-nowrap — stays on one line and overflows
text-truncate — one line, ends with …
Vertical Text
For narrow column headers and spine labels.
text-vertical
text-vertical-up
Semantic Text
Compound shorthands.
text-lead — an introductory paragraph at 16px with relaxed line-height, for the opening sentence of a section.
text-caption — small muted text at 12px, for figure captions and fine print.
Inline Text
Inline spans: muted, primary, secondary, success, danger, warning, info.
Emphasis: strong, em, semibold, mono.
Links
Class Reference
| Category | Classes |
|---|---|
| Font size | text-{2xs|xs|sm|md|base|lg|xl|2xl|3xl|4xl} (10 / 12 / 14 / 15 / 16 / 18 / 20 / 24 / 28 / 32px) |
| Colour — neutral | text-body, text-muted |
| Colour — roles | text-{primary|secondary|success|danger|warning|info} |
| Colour — slots | text-color-{1-9} |
| Text on colour | text-on-{role}, text-on-color-{1-9} (pair with bg-*; or use surface-* for both) |
| Weight | font-weight-{normal|medium|semibold|bold} |
| Style | font-style-{normal|italic} |
| Family | font-family-{system|sans|serif|mono} |
| Alignment | text-start, text-center, text-end |
| Wrapping | text-nowrap, text-truncate |
| Vertical | text-vertical, text-vertical-up |
| Semantic | text-caption, text-lead |
| Whole-page scale | font-size-{small|default|large|xlarge} on <html> — see Getting Started |