Skip to content
Hazine

Hero Section

Centred opening section with an optional badge, one heading, a supporting paragraph and a primary plus secondary action. Use it as the default text-only hero.

How it differs. Baseline centred stack: badge, heading, paragraph and two actions in one column, with no media and nothing else above the fold.

Install

pnpm dlx shadcn@latest add @hazine/hero-section

Adds 1 file, 2 shadcn primitives (badge, button), 1 Hazine item (@hazine/heading), and 1 package (lucide-react).

First time? Add the registry to components.json
{
  "registries": {
    "@hazine": "https://api.hazine.dev/r/{name}.json"
  }
}

Needed once per project. Items resolve each other through the @hazine namespace.

Props6

announcement
string | null = "Recurring invoices are live"
Short line in a badge above the heading. Pass null to leave it out.
title
string = "Send the invoice before the meeting ends"
description
string = "Tallyroom turns tracked hours into itemised invoices, sends them on schedule and follows up on late payments for you."
primaryAction
HeroAction = DEFAULT_PRIMARY_ACTION
secondaryAction
HeroAction | null = DEFAULT_SECONDARY_ACTION
Pass null to render a single action.
headingLevel
1 | 2 | 3 = 1

Also accepts every prop of Omit<React.ComponentProps<"section">, "title">.

Accessibility

Pattern
Landmarks and headings
Keyboard
Nothing to operate. The item has no focusable parts.
Screen reader

A section labelled by its heading, whose level is a prop. The actions are links and the arrow icon is decorative.

Reduced motion
No motion. Colour transitions only.
Checked
Not checked yet. Automated results appear here once CI has run.

Dependencies4

  • badge
  • button
  • @hazine/heading
  • lucide-react

Filled chips are registry items the CLI adds for you. Outlined chips are npm packages.

Tokens shipped0

None. The item is styled by the tokens your theme already has.

Other takes on this1

The same question answered with a different structure.

  • headline led

    One slot in a start-aligned heading rotates through nouns under a pause and step control, and a hairline index of every noun below marks the one on show. Static full list under reduced motion.

    shadcn add @hazine/hero-rotating-noun

    Depends on button, @hazine/heading, @hazine/use-controllable-state, lucide-react

More in Heroes