Skip to main content
The Heading component is a primitive component for rendering semantic headings (h1-h6) with theme-aware typography.

Import

Usage

Props

'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
default:"'h2'"
Semantic heading level. Defaults to h2.
string
default:"'heading'"
Text variant from theme.text. The default heading variant uses theme.text.heading.
ThemeUIStyleObject
Theme-aware styles for custom heading appearance.

Inherited Props

Heading extends Box and accepts:
  • All standard HTML heading attributes
  • Box spacing props (m, p, mx, my, px, py, etc.)
  • Box color props (color, bg, opacity)

Default Styles

The Heading component includes these base styles:
These map to theme.fonts.heading, theme.fontWeights.heading, and theme.lineHeights.heading.

Examples

Semantic Headings

Responsive Heading

Colored Heading

Custom Heading

Heading with Underline

Centered Heading

Heading with Gradient