Options
Color
Text can be colored using any of the functional color tokens. Only foreground colors should be used.
Default text color
color-fg-default
Muted text color
color-fg-muted
Subtle text color
color-fg-subtle
Accent text color
color-fg-accent
Success text color
color-fg-success
Attention text color
color-fg-attention
Severe text color
color-fg-severe
Danger text color
color-fg-danger
Other typographic styles
See Primer Primitives typography for more details about Primer''s typography system.
f00-light - Hero heading
f00-light
f1-light - Large heading
f1-light
f2-light - Medium heading
f2-light
f3-light - Small heading
f3-light
f4 - Body text
f4
f5 - Small body text
f5
f6 - Caption text
f6
Accessibility and usability expectations
⚠️ Important
The component provides no semantic information. It''s only function is to provide access to color tokens for styling text content.
It is up to the designer / implementer to select the appropriate color token for the text content to ensure that it has sufficient contrast against the background color.
Built-in accessibility features
None.
Implementation requirements
When using the component, ensure that the color token used for the text content has sufficient contrast against the background color.
How to test the component
Integration tests
None
Component tests
- The text output has sufficient contrast against the background color.
Known accessibility issues (GitHub staff only)
View accessibility issuesRelated links
Interactive Demo
Preview:
Sample text content