Root Props
| Prop | Type | Default |
|---|---|---|
as | HeadingAs | — |
| The HTML heading tag to render (e.g., 'h1', 'h2'). Defines semantic structure and accessibility level. | ||
size | HeadingSize | — |
Visual size of the heading, independent of the as tag. Typically mapped to a design system's type scale. Accepts values from 1 (smallest) to 11 (largest). | ||
fontWeight | 400 | 500 | 600 | 700 | 900 | — |
| Font weight of the heading text. 400: Regular; 500: Medium; 600: Semi-bold; 700: Bold; 900: Extra bold | ||
ref | Ref<HTMLHeadingElement> | — |
| Ref to the native HTML heading element. Useful for DOM access or focus management. | ||
Also accepts all <h1>–<h6> attributes.
Child Parts
- None.
Headingis a single exported primitive.
Types
HeadingPropsHeadingAsHeadingSize
State Model
Headinghas no controlled state.- Semantics come from
as; visuals come fromsizeandfontWeight.