Heading
Standalone semantic heading export for starter-kit typography
Display heading
Section heading
Subsection heading
Accessibility
- Treat the component as presentational unless it exposes interactive affordances, and label any interactive affordances explicitly.
- Keep heading, reading, and focus order aligned with the surrounding content.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
Import options
Root package
ts
import { Heading } from '@dryui/ui' Per-component subpath
ts
import { Heading } from '@dryui/ui/heading' API
Props, CSS variables, and the public data attributes you can target when styling.
| Prop | Type | Description | Default | Required | Bindable |
|---|---|---|---|---|---|
| level | 123456 | Semantic heading level to render. | 2 | — | — |
| variant | defaultdisplay variant='display' uses --dry-font-display, which defaults to --dry-font-sans. For a distinct display typeface (e.g., a serif), override --dry-font-display on body or a scoped wrapper, not :root. See recipe: serif-display. | Visual style preset for the component. | 'default' | — | — |
| maxMeasure | narrowdefaultwidefalse Caps the rendered inline size in ch units: narrow~22ch, default~45ch, wide~65ch. Use narrow for editorial hero headlines. Replaces the grid-wrapper hack that existed while dryui/no-width banned max-width. | Caps rendered inline size on an ergonomic text measure (ch unit). Pass narrow, default, or wide, or false to opt out. | false | — | — |
| className | HTMLAttributes<HTMLHeadingElement>['class'] | — | — | — | — |
| children | Snippet | Content rendered inside the component. | — | ✓ | — |