<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5HGSQD2L" height="0" width="0" style="display:none;visibility:hidden" title="GTM"></iframe>

Heading (H1–H6)

Headings help to structure content on a page by creating clear visual hierarchy. SWAN has six heading components that render stylized HTML <h*> tags.

Use H1–H6...

  • To create a clear typographic hierarchy and page structure.
  • For text that is semantically a heading or title. For all other text, use Typography.

Don't use H1–H6...

  • For decoration or emphasis (headings should have semantic value).
  • For body text. Instead, use Typography.

Structure

Use heading components (H1, H2, H3, H4, H5, H6) based on the document hierarchy of the page content.

Info:

Don’t skip heading levels, since screen readers build an outline of the page from the headings, and use this outline to assist users as they navigate a page. The page title should be a <h1>, the next level of heading should be a <h2>, and so on. In other words, don't use <h3> unless preceded by <h2>.

Info:

For SEO and accessibility reasons, use one <h1> tag per page, which should usually be the page title.

The preview has been updated.

Skin

SWAN's fontSkin property provides a set of styling decisions: font size, font weight, font family, line height, and letter spacing. It is the preferred way to set typography.

If your text does not need to be a semantic heading (<h1><h6> tags), use Typography instead.

The preview has been updated.

Info:

Be sure to load the font Tiempos when using any editorial font skins. See the Get Started docs for instructions.

Size

For edge cases where fontSkin isn't sufficient, use the fontSize prop to create visual hierarchy on the page. For a list of available font sizes, see Font size.

Info:

Designs should only specify the desired font size, rather than making reference to specific HTML tags.

Changing the default heading size

The H1-H6 components have a default size. As the visual text size hierarchy may not follow the document hierarchy, use fontSkin or fontSize to adjust the size of a heading as needed. Any text size can be used on any heading component.

The preview has been updated.

Font family

The Graphik font family is Vista’s default font for all headings and text. For special cases (typically specific to a marketing or holiday campaign) you can set up a page to support an additional font, and use the fontFamily prop to adjust the font family.

You need to provide all the necessary fonts while setting up the SwanHead. The current special font in use for headings is Tiempos (contact #help-swan for access). Once set up on your page, use fontFamily="special" for Tiempos.

A heading using Graphik and Tiempos

Weight, line height, and letter spacing

The font skins provide the font size, weight, line height, and letter spacing to create hierarchy for each size. Use these defaults for all headings.

Color

Headings use color textColor="standard" by default, which should be sufficient for almost all cases. Contact #help-swan if you are considering using a different color for a heading.

Info:

Text and background must meet a 4.5:1 color contrast ratio.

Alignment

Headings should be aligned to the left in most cases. In cases where center-aligning content is more appropriate, use textAlign=”center”. Headings should not be right-aligned or fully justified. Refer to Typography for more information on use cases.

Case

Use sentence case for all headings. Refer to Typography for more information.

Content

  • Keep headings short.
  • Sentence case is our default capitalization standard — for headings, CTAs, body content and anything other than known exceptions.
  • Don’t use textAllCaps for headings. Instead, use sentence case.
  • Don't use any additional fonts other than those provided.

Structure

  • Designs should only specify the desired font size, rather than making reference to specific HTML tags.
  • Headings should be used with intention that maintains a coherent document outline.
  • There can only be one <h1> tag per page.
  • Don't introduce new type sizes.

Props

The H1–H6 components don’t have any props. SWAN provides core props that can be applied to any typographic element. Refer to Core props for more information.


Related

Was this page useful?

Thanks for your feedback!

Feel free to include your name if you wish to have a follow up conversation.


Published: Aug 11, 2022Last updated: Sep 3, 2024