Heading
Color
Heading text color is inherited from Carbon’s theme tokens:
| Element | Property | Token |
|---|---|---|
| Text | color |
|
For more on color usage, see Typography overview.
Typography
The Heading component renders semantic HTML elements (h1-h6) with default browser styling. Apply Carbon type tokens via
className
For detailed information on type tokens and their usage, see Type sets.
Applying type tokens
To use type token classes like
cds--type-heading-05
@use '@carbon/type';@include type.type-classes();
Then apply the class to your Heading component:
<Heading className="cds--type-heading-05">Visually styled as heading-05</Heading>
Learn more about applying type tokens in Type sets.
Productive type tokens
Fixed sizes for product interfaces:
| Token | Size (px/rem) | Weight | Line-height (px/rem) |
|---|---|---|---|
| 14 / 0.875 | SemiBold / 600 | 18 / 1.125 |
| 16 / 1 | SemiBold / 600 | 22 / 1.375 |
| 20 / 1.25 | Regular / 400 | 28 / 1.75 |
| 28 / 1.75 | Regular / 400 | 36 / 2.25 |
| 32 / 2 | Regular / 400 | 40 / 2.5 |
| 42 / 2.625 | Light / 300 | 50 / 3.125 |
| 54 / 3.375 | Light / 300 | 64 / 4 |
Expressive type tokens
Fluid sizes for responsive layouts:
| Token | Min (px/rem) | Max (px/rem) | Weight |
|---|---|---|---|
| 20 / 1.25 | 24 / 1.5 | Regular / 400 |
| 28 / 1.75 | 32 / 2 | Regular / 400 |
| 32 / 2 | 40 / 2.5 | Regular / 400 |
| 42 / 2.625 | 54 / 3.375 | Light / 300 |
For more on typography layout and spacing, see Type basics.