Section Heading
The heading of a page section: eyebrow, a large title, a description and actions, start-aligned or centered, with the heading level and id the enclosing section names itself by.
Example
Everything is a block.
An eyebrow, a title, a description and actions that move below the title on narrow containers.
Centered, one level down.
section-heading-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
Head each page section with it, and give the section aria-labelledby the headingId so it becomes a named region.
API reference
SectionHeading
| Prop | Type | Default |
|---|---|---|
eyebrow | ReactNode | – |
titlerequired | ReactNode | – |
description | ReactNode | – |
actionsLinks or buttons beside the heading on wide containers, below it on narrow ones. | ReactNode | – |
align | "start" | "center" | "start" |
headingLevel | 2 | 3 | 4 | 2 |
headingIdThe heading's id, so the enclosing `<section aria-labelledby>` can name itself after it. | string | – |
Also takes <header> attributes except title.
Other exports
type SectionHeadingPropsAccessibility
- The heading level is yours to set, so the outline stays in order.
Agent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.