Heading

GitHub

Semantic HTML heading with shadcn typography styles for levels h1 through h6.

Installation

bash
pnpm dlx shadcn@latest add @cs/heading

Usage

tsx
import { Heading } from "@/components/cs/heading"
tsx
<Heading level="h1" secondary>Heading one</Heading>
<Heading level="h2">Heading two</Heading>
<Heading level="h3">Heading three</Heading>
<Heading level="h4">Heading four</Heading>
<Heading level="h5">Heading five</Heading>
<Heading level="h6">Heading six</Heading>

API Reference

headingVariants

Heading

Semantic heading with shadcn typography styles for each HTML heading level.

Props

NameTypeDefaultDescription
level"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | null | undefined"h1"-
secondarybooleanfalse-