Display Heading
The Display Heading component provides extra-large headings for prominent page titles and hero sections. Use Display Heading when you need headings that are larger than standard Heading variants.Installation
Usage
Props
DisplayHeading Props
| Prop | Type | Default | Description |
|---|---|---|---|
as | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span' | 'header' | - | Required. HTML element to render. |
variant | 'displayHeading10' | 'displayHeading20' | 'displayHeading30' | - | Required. The variant of the display heading. |
element | string | 'DISPLAY_HEADING' | Overrides the default element name to apply unique styles with the Customization Provider. |
display | TextProps['display'] | 'block' | CSS display property. |
id | string | - | Same as HTML id attribute. |
marginBottom | 'space0' | - | Currently we only allow space0 to remove bottom margin. |
Variants
The Display Heading component provides three variants:- displayHeading10: Largest (fontSizeDisplay30, lineHeightDisplay30, marginBottom space170)
- displayHeading20: Default, large (fontSizeDisplay20, lineHeightDisplay20, marginBottom space130)
- displayHeading30: Medium (fontSizeDisplay10, lineHeightDisplay10, marginBottom space90)
fontWeightExtrabold and fontFamilyDisplay.
Examples
All Variants
Removing Bottom Margin
Customization
The Display Heading component can be customized using the Customization Provider:Key Differences from Heading
- Uses
fontFamilyDisplayinstead of the default font family - Larger font sizes and spacing than standard Heading variants
- Uses
fontWeightExtraboldinstead offontWeightSemibold - Best suited for hero sections and prominent page titles
Accessibility
- Use semantic HTML heading tags (
h1throughh6) to create a logical document outline - Don’t skip heading levels (e.g., don’t jump from
h1toh3) - Each page should have one
h1element - Consider that very large text may be difficult to read for users with certain cognitive disabilities