Heading

Semantic h1–h6 in Merid's heading style: weight 600, negative tracking and text-wrap: balance. The visual size is independent of the level, so the outline stays correct while the design stays consistent.

StableSource

Ship calmer interfaces

Import

tsx
import { Heading } from "@merid/react";

Examples

Default sizes

Each level has a default size: level 1 is display, 2 is h2, 3 is h3, and 4–6 map to lg, md and sm.

Display

Heading h2

Heading h3

Heading lg

Heading md
Heading sm

Size independent of level

Pick level from the document outline and size from the design. A settings panel title may be an h2 that looks like a small heading.

Billing history

Invoices

API reference

Heading forwards its ref to the heading element and passes other HTML attributes through.

PropTypeDefaultDescription
level1 | 2 | 3 | 4 | 5 | 62Semantic level: renders h1–h6.
size"display" | "h2" | "h3" | "lg" | "md" | "sm"–Visual size. Defaults by level: display, h2, h3, lg, md, sm.

Styling

HookValues
.mrd-headingRoot <h1>–<h6>
data-sizedisplay · h2 · h3 · lg · md · sm

Sizes read the typography tokens (see Typography); there are no heading-specific variables.

Accessibility

  • Keep one h1 per page and do not skip levels going down; change size, not level, to adjust the look.
  • Never use a heading only for large text — use Text with size="lg".

Guidelines

Do

Choose level from the page outline and size from the design.

Avoid

Jump from h2 to h5 because the smaller size looked right.

  • Text — body copy and captions.
  • VisuallyHidden — headings that only assistive tech needs.