Content primitives

Heading

Applies the heading scale with an independent semantic level.

tsx
import Heading from '@precursor/heading';

Example

A strong foundation.

tsx
import Heading from '@precursor/heading';

export default function Example() {
    return (
        <Heading as="h2" size="h1">
            A strong foundation.
        </Heading>
    );
}

Props

Heading props
PropTypeDefaultNotes
childrenRequiredReact.ReactNode——
idstring——
asHeadingsweight ?? 'h2'—
sizeHeadingsweight ?? 'h2'—
weightHeadings—Sets the heading level and size when their dedicated props are omitted.