Skip to main content
Mantı UI logoMantı UIv0.12.1
Studio

Heading

Heading renders a real h1h6 element with Manti's title treatment: tighter leading than body copy, semibold weight, and optical tracking that pulls in as the type grows.

Design tokens are mandatory

Every visual value comes from the token contract, so a consumer can restyle a component without forking it.

Level

level picks both the element and a sensible default size, so plain markup already reads correctly.

Level 1 heading

Level 2 heading

Level 3 heading

Level 4 heading

Level 5 heading
Level 6 heading

Level and size are independent

Document outline and visual hierarchy are different problems. size overrides the stop level implies, which means a section can stay an h2 for screen readers while laying out small, and a hero can be an h1 at display size — without anyone reaching for a styled <div>.

h1 at 4xl

h2 at sm — an eyebrow that still belongs to the outline

Both are real heading elements; only the visual stop changed.

If you genuinely need the look without the rank, as overrides the element and leaves the styling in place.

Weight

Weight rides the size prop after a slash, the same way Text does. Leaving it off keeps the stylesheet's default, which is bold at level={1} and semibold everywhere else:

<Heading level={1} />                  // bold, from the level
<Heading level={1} size="4xl/regular" />  // same stop, weight overridden

Emphasis and variant

Heading shares Text's two color axes: emphasis for the neutral ladder and variant for semantic color.

Default title

Muted title

Danger title

API

Heading accepts every native attribute of the rendered heading element in addition to the props below.

PropTypeDefaultDescription
level1 | 2 | 3 | 4 | 5 | 62Semantic heading rank. Picks the h1-h6 element and the default size.
sizeTextScale | `${TextScale}/${TextWeight}`Type-scale stop, optionally with a weight: "4xl" or "4xl/regular". Defaults to the stop implied by level, so rank and visual size stay independent.
asElementTypeOverride the rendered element, keeping the heading treatment.
emphasis'default' | 'muted' | 'subtle''default'Neutral emphasis ladder.
variantMantiVariantSemantic color. Wins over emphasis when both are set.
align'start' | 'center' | 'end'Text alignment.
truncatebooleanfalseClamp to a single line with an ellipsis.

Styling

Anatomy

PartSelectorDescription
root[data-scope="heading"][data-part="root"]The rendered heading element.

Tokens

TokenControls
--manti-heading-font-sizefont size
--manti-heading-line-heightline height
--manti-heading-weightweight
--manti-heading-trackingtracking

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub