Heading

A heading primitive that renders h1 through h6 with a matched type scale, tuned letter spacing and medium weight. Pick the level with the as prop in React.

src/registry/ui/heading.tsx/r/heading.json

Installation#

bash
npx shadcn@latest add @minidev/heading

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/heading.json

Usage#

tsx
import { Heading } from "@/components/ui/heading"

export function Example() {
  return (
    <Heading as="h1">Heading one</Heading>
  )
}

API reference#

Heading props
PropTypeDefault
askeyof typeof sizes"h2"

Also accepts every prop of <h2>, passed through to the root element.

Examples#

All layout components

Learn more