Typography
Heading and Text over the token-driven type scale: level is the document outline, size is the rung, tone is the color role. Native tags may still wear one text-* rung directly.
Composition
Heading and Text
Heading takes level (the document outline) and size (the rung); they are decoupled on purpose, so an h3 may wear heading-2. Text takes as, size, weight, and tone. className is for layout only: size, weight, face, and color come from props.
- page section
- <Heading />
- <Text />
Native tag
A native tag may wear one text-* rung and nothing else from the scale: pair it with a tone or weight and it becomes Text or Heading. Heading rungs already carry font-display and text-balance.
- one rung on the element
- <h2 />
- <p />
Installation
The Control UI source installs this primitive from src/registry/sources/control-ui/ui/typography.tsx.
Dependencies
src/registry/examples/control-ui/primitives/type-scale.cssSupportsrc/registry/sources/control-ui/ui/markdown-heading.tsSupportRaw code
Primary installed source