Content blocks
Heading
The Heading 1–3 blocks (plus Heading 4) at weight 600, sized in em of the 16px content. Any heading can be a toggle heading.
Heading 1
Heading 2
Heading 3
Heading 4
Usage
- Use Heading 1–3 to structure a page into sections; keep levels in order without skipping.
- Use a toggle heading when a long section should be collapsible.
- Use Heading 4 sparingly for small sub-sections inside dense pages.
- Don’t use headings for emphasis inside running text; use bold marks instead.
- Don’t use a heading as the page title; use Page title.
Installation
Install the package (React 19):
terminal
terminal
terminal
Import the styles once, in your app entry or root layout:
/src/main.tsx
Use it anywhere inside your app's <Theme> (see Installation):
/src/HeadingExample.tsx
Examples
Toggle heading
With toggleable, a 24px disclosure triangle sits before the text and children show when open. An open toggle heading without children shows the “Empty toggle” hint, and its triangle is at 50% opacity.
Toggle heading 2
Content inside the heading.
Empty toggle heading
Color
Purple heading
Highlighted heading
API Reference
Heading
Based on <div> and supports its props. Adds:
| Prop | Type | Default |
|---|---|---|
level | 1234 | 1 |
text | RichText | |
renderLeaf | LeafRenderer | |
color | BlockColor | "default" |
toggleable | boolean | false |
open | boolean | |
onOpenChange | (open: boolean) => void | |
children | ReactNode | |
onEmptyClick | () => void |
headingVariants
tv slots root, pad, leaf with variant level, for custom heading markup.
| Prop | Type | Default |
|---|---|---|
level | 1234 | 1 |
Accessibility
- Each heading is a
role="heading"witharia-levelone below its block level (the page title is the h1): Heading 1 is level 2 … Heading 4 is level 5, so the page has a real heading outline. - The toggle triangle is the
DisclosureTogglebutton witharia-expanded;Enter/Spacetoggle it.
© 2026 Motion. Internal documentation.