Heading

Semantic headings built on Text, with per-level size and weight defaults.

Heading h1

Heading h2

Heading h3

Heading h4

Heading h5
Heading h6

Import#

import { Heading } from "astralis-ui";

Usage#

as picks the heading level (h1h6, default h2) and brings a matching default size (4xlmd) and weight (bold for h1–h3, semibold below). Heading also presets the heading font family, tight leading and tight tracking — override any of it with the regular Text props.

Decoupling size from level#

Heading levels are for the document outline; size is for the design. Override size freely without breaking semantics or accessibility.

Visually huge

…but still an h2 in the document outline.

Props#

Heading accepts every Text prop except paragraph, plus:

PropTypeDefaultDescription
as"h1" | "h2" | "h3" | "h4" | "h5" | "h6""h2"Heading level; sets the default size and weight.
sizeText sizesper levelh14xl, h23xl, h32xl, h4xl, h5lg, h6md.
weightText weightsper levelBold for h1–h3, semibold for h4–h6.