Typography Tokens
Typography tokens are used to maintain a consistent set of font styles throughout your app.
Font Family
The default font stack is designed to be simple and highly available on as many devices as possible.
Token | Value | Example |
---|---|---|
--p-font-sans |
-apple-system, BlinkMacSystemFont, ‘Segoe UI’, Roboto, Helvetica, Arial, sans-serif, ‘Apple Color Emoji’, ‘Segoe UI Emoji’, ‘Segoe UI Symbol’ | The quick brown fox jumped over the lazy dog. |
--p-font-serif |
Georgia, ‘Times New Roman’, serif | The quick brown fox jumped over the lazy dog. |
--p-font-mono |
SFMono-Regular, Consolas, ‘Liberation Mono’, Menlo, monospace; | The quick brown fox jumped over the lazy dog. |
Font Size
Font sizes use rem
units so they scale with the base font size. The pixel values displayed are
based on a 16px font size.
Token | Value | Example |
---|---|---|
--p-font-size-2x-small |
0.625rem (10px) | Aa |
--p-font-size-x-small |
0.75rem (12px) | Aa |
--p-font-size-small |
0.875rem (14px) | Aa |
--p-font-size-medium |
1rem (16px) | Aa |
--p-font-size-large |
1.25rem (20px) | Aa |
--p-font-size-x-large |
1.5rem (24px) | Aa |
--p-font-size-2x-large |
2.25rem (36px) | Aa |
--p-font-size-3x-large |
3rem (48px) | Aa |
--p-font-size-4x-large |
4.5rem (72px) | Aa |
Font Weight
Token | Value | Example |
---|---|---|
--p-font-weight-light |
300 | The quick brown fox jumped over the lazy dog. |
--p-font-weight-normal |
400 | The quick brown fox jumped over the lazy dog. |
--p-font-weight-medium |
500 | The quick brown fox jumped over the lazy dog. |
--p-font-weight-semibold |
600 | The quick brown fox jumped over the lazy dog. |
--p-font-weight-bold |
700 | The quick brown fox jumped over the lazy dog. |
Letter Spacing
Token | Value | Example |
---|---|---|
--p-letter-spacing-denser |
-0.03em | The quick brown fox jumped over the lazy dog. |
--p-letter-spacing-dense |
-0.015em | The quick brown fox jumped over the lazy dog. |
--p-letter-spacing-normal |
normal | The quick brown fox jumped over the lazy dog. |
--p-letter-spacing-loose |
0.075em | The quick brown fox jumped over the lazy dog. |
--p-letter-spacing-looser |
0.15em | The quick brown fox jumped over the lazy dog. |
Line Height
Token | Value | Example |
---|---|---|
--p-line-height-denser |
1 |
The quick brown fox jumped over the lazy dog.
The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. |
--p-line-height-dense |
1.4 |
The quick brown fox jumped over the lazy dog.
The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. |
--p-line-height-normal |
1.8 |
The quick brown fox jumped over the lazy dog.
The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. |
--p-line-height-loose |
2.2 |
The quick brown fox jumped over the lazy dog.
The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. |
--p-line-height-looser |
2.6 |
The quick brown fox jumped over the lazy dog.
The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. |