Skip to Content

Heading

Page headline component: a responsive h1 for landing page heroes and page titles. One size that scales from mobile to desktop, balances its line breaks, and uses your display font. Pair with Text for the lead paragraph.

View as Markdown
pnpm dlx shadcn add @01orbital/heading

The example also uses section. Install it too:

pnpm dlx shadcn add @01orbital/section

Usage

import { Heading } from "@/components/heading/heading"
import {
  Section,
  SectionContent,
} from "@/components/section/section"

const COPY = {
  text: "Plan the release, not the meeting about it",
}

export default function HeadingDemo() {
  return (
    <Section className="py-0">
      <SectionContent className="px-0 lg:px-0">
        <Heading>{COPY.text}</Heading>
      </SectionContent>
    </Section>
  )
}

Examples

Catalogue Raisonneheading-catalogue-raisonne

Heading Catalogue Raisonne: an example of heading.

pnpm dlx shadcn add @01orbital/heading-catalogue-raisonne

Cover Headline With Bylineheading-cover-headline-byline

Cover Headline With Byline: an example of heading.

pnpm dlx shadcn add @01orbital/heading-cover-headline-byline

Landing Heroheading-landing-hero

Heading Landing Hero: an example of heading.

pnpm dlx shadcn add @01orbital/heading-landing-hero

Serif Signed Statement Headingheading-serif-signed-statement

Serif Signed Statement Heading: an example of heading.

pnpm dlx shadcn add @01orbital/heading-serif-signed-statement

API reference

The page headline in the display font, rendered as an <h1>: 48px with a 48px line, 64px with a 64px line from the sm breakpoint. One size, no props beyond the element's own; pass render to use another element. Its lines are balanced when it wraps. Section and card titles use Subheading.

It accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

Dependencies

npm: @base-ui/react, cn. The CLI installs them for you. cn merges Tailwind class names, in place of clsx and tailwind-merge.

Used in blocks

27 blocks are built with Heading; the first 12: