Figma
Star462

Display Heading

Version 4.1.0GithubStorybookPeer review pending

Display heading is large, expressive text that stands out from traditional headings and is used for marketing and attention grabbing purposes.

Twilio magic
Component preview theme
<DisplayHeading as="div" variant="displayHeading10" marginBottom="space0">
Twilio magic
</DisplayHeading>

Display heading is large, expressive text that stands out from traditional headings and is used for marketing and attention grabbing purposes.

Display Heading should not be used interchangeably with the Heading component. While Heading is for adding multiple levels of hierarchy and structuring the content of any page, Display Heading should only be used in very specific contexts.

Use Display Heading for marketing, branding, or editorial purposes to highlight a small amount of text. Don't use Display Heading to outline sections of a page or form.

Follow these guidelines for appropriate Display Heading usage:

  • Don’t use Display Heading to resize text. Instead use the Text primitive.
  • Use the appropriate tag for the Display Heading. If using an <h1> tag, don't use more than one per page.
  • Always use sentence case, unless you're writing a product name. For more information read the product style guide

Here are some examples of when you might want to use a Display Heading:

  • Grabbing your user's attention on a home or onboarding page
  • Marketing purposes or when you need to connect with the Twilio branding
  • Displaying numbers on a dashboard layout to make them stand out

If you have concerns about whether you're using a Display Heading appropriately, feel free to start a new Github Discussion(link takes you to an external page) to ask.

It is important to not skip one or more heading levels as it is common for screen readers to build an outline of the page and assist users as they navigate a page. Skipping a heading level could cause confusion as the user navigating the page may not know why a heading is missing.

  • Display Heading text should meet AA requirements (4.5:1) for color contrast from itself and the background color
  • Display Headings should be used thoughtfully and intentionally, including the value passed to the as prop.
Twilio magic
Twilio magic
Twilio magic
Component preview theme
<>
<DisplayHeading as="div" variant="displayHeading10">
Twilio magic
</DisplayHeading>
<DisplayHeading as="div" variant="displayHeading20">
Twilio magic
</DisplayHeading>
<DisplayHeading as="div" variant="displayHeading30">
Twilio magic
</DisplayHeading>
</>

Display Heading as h1 with displayHeading10 variant

Display Heading as h1 with displayHeading10 variant page anchor

Display Heading one

Component preview theme
<DisplayHeading as="h1" variant="displayHeading10">
Display Heading one
</DisplayHeading>

Display Heading as h2 with heading20 variant

Display Heading as h2 with heading20 variant page anchor

Display Heading two

Component preview theme
<DisplayHeading as="h2" variant="displayHeading20">
Display Heading two
</DisplayHeading>

Heading as h3 with displayHeading30 variant

Heading as h3 with displayHeading30 variant page anchor

Display Heading three

Component preview theme
<DisplayHeading as="h2" variant="displayHeading30">
Display Heading three
</DisplayHeading>

Display Heading with no bottom margin

Display Heading with no bottom margin page anchor

Display Heading with no margin

Component preview theme
<Card>
<DisplayHeading as="h2" marginBottom="space0" variant="displayHeading10">
Display Heading with no margin
</DisplayHeading>
</Card>

When to use Display Heading

When to use Display Heading page anchor

This is sentence case

Do

Use sentence case in Display Headings (except for a product name).

This Is Title Case

Don't

Don’t use title case.

Do

Use Display Headings to connect with the brand or grab users' attention.

Don't

Don’t use Display Headings in place of the regular Heading component.

Do

Be intentional about the value you pass to the `as` prop.

Don't

Don’t use multiple h1 tags on a page.

To help us improve this site, we use tools that set cookies. The data gathered by these tools is anonymized. If you reject the use of cookies, no analytics service will be initiated.