Heading

Heading titles a section or page in Mosaic. It renders as an <h2> by default, forwards a ref to the underlying element, and themes its font-size and color through the size and color variants. Reach for the render prop when you need a different heading level for the document outline.

Playground

Props

PropTypeDefaultValue
size'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl''base'
color'primary' | 'neutral' | 'warning' | 'negative' | 'positive''primary'
render(props) => ReactNode
classNamestring
styleCSSProperties

Usage

import { Heading } from '@clerk/ui/mosaic/components/heading';

<Heading
  size='base'
  color='primary'
>
  Page Title
</Heading>

Examples

Sizes

Extra small heading

Small heading

Base heading

Large heading

Extra large heading

2XL heading

Colors

Primary heading

Neutral heading

Warning heading

Negative heading

Positive heading