Surfaces

Heading

A typographic element that enhances readability and SEO by defining section titles with hierarchical importance, improving content structure and user experience.

The quick brown fox jumps over the lazy dog

Installation

Install the component via the CLI in one command.

npx shadcn@latest add @intentui/heading

Anatomy

import { Heading } from "@/components/ui/heading"
<>
 <Heading level={1}>The quick brown fox jumps over the lazy dog</Heading>
 <Heading level={2}>The quick brown fox jumps over the lazy dog</Heading>
 <Heading level={3}>The quick brown fox jumps over the lazy dog</Heading>
 <Heading level={4}>The quick brown fox jumps over the lazy dog</Heading>
</>

Manual installation

Use this approach if you prefer to install and wire up the component yourself instead of using the CLI.

npm install tailwind-merge

Examples

Heading levels

By default, when a heading is used on a card component, it will default to level 3. Titles range from levels 1 to 4. Each level determines the title type and font size.

Loading...

Component API

The Heading component renders a styled heading.

PropTypeDefault
classNamestring-
level1 | 2 | 3 | 41
Unlock the full power of
Intent UI Design

Build modern web apps faster with 1000+ resources across components, blocks, patterns, templates, and starter kits.

Learn more