Skip to content

Content

Heading

Section heading below Display. Semantics (as) and looks (size) are separate.

  • Ready
  • No keyboard interaction
  • Screen reader not tested yet

Updated 2026-11-12

Playground

Change the props and the surface. The controls come from the documented props; the surfaces are the real modes.

How the gate works

tsx
<Heading>How the gate works</Heading>

Usage

When to use

Use Heading for every section heading below the page title, usually with an Eyebrow above it.

When not to use

  • For the page title: use Display as h1.
  • To make text bold: a heading is structure, not emphasis.

How it works

as sets the level (h2 to h4) by the page outline; size sets the look: heading for sections, body-strong for small headings inside cards and lists. Level and look are independent, so the outline stays correct whatever the design needs.

Content guidelines

Headings name what the section contains, in a few words. Don't skip levels because a smaller look fits; change the size instead.

Do and don’t

  • Approach

    Tokens first, screens second

    Every value got a name before any screen was drawn.

    DoHierarchy from type and order: eyebrow, heading, text.

    Approach

    Tokens first, screens second

    Every value got a name before any screen was drawn.

    Don’tA card around a heading to give it weight: boxes are for things people compare or act on.
Do
  • Eyebrow above Heading for section heads.
  • Pick as by the document outline and size by weight.
Don’t
  • Don't skip a level because the look fits.
  • Not for page titles; use Display as h1.
  • Never larger than the heading it sits under: a card title stays below its section heading, an intro claim below the page h1.

Anatomy

The parts of the component and what each one does, as in the playground above.
  1. labelOnest semibold in the heading or body role.

Examples

Type-checked, and the same code goes into the AI manifest. Import: import { Heading } from "@/ds";

Eyebrow above Heading

02 — Challenge

How the gate works

body-strong as h3

Contrast pairings

Props

Checked against the component's TypeScript type on every build.
Heading props
NameTypeDefaultDescription
as"h2" | "h3" | "h4""h2"Heading level that fits the document outline.
size"heading" | "body-strong""heading"heading for sections, body-strong for small subheadings.
children (required)ReactNode–Heading text.

Tokens used

Derived from the utility classes in the component's source. Copy a class with one click.
Tokens used by Heading
TokenTierValueUtility
heading.weightcomponent700
text.primarysemantic#0A0A0B
type.body.sizesemantic16px
type.heading.sizesemanticclamp(24px, 2.5vw, 32px)

Accessibility

What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
Testing status by check
CheckHowStatus
axe-core rulesAutomated on every npm run check, at desktop and mobile widthRuns on every build
KeyboardAutomated Playwright test (scripts/keyboard.mjs)Not applicable
Screen readerManualNot tested yet

Semantics and focus

  • Renders real h2–h4, so the outline stays complete.