Skip to content
Haze UI

Hero: centered product overview

A centered introduction and action above a wide image placeholder for the product preview.

pnpm dlx shadcn@latest add @haze/hero-product-overview
Open preview in a new tab
Liveno JavaScript

When to use

  • Introducing a product with room for a broad interface preview
  • A single action should lead into the product overview

When not to use

  • The introduction needs a form alongside its visual; use hero-split-image

Installation

Add the Haze registry to components.json once, then install Hero: centered product overview with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/hero-product-overview
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
idstring"hero-product-overview"Unique section and preview anchor prefix.
eyebrowstring"A clearer way to work"Short label above the heading.
titlestringdemo headingMain introduction.
descriptionstringdemo copySupporting introduction.
actionLabelstring"Explore the preview"Text for the primary link.
actionHrefstring–Action destination; defaults to this block's preview anchor.
previewLabelstring"Illustrative product interface"Accessible description for the illustrative preview.
headingLevel1 | 2 | 32Heading level for the page context.
classstring–Additional section classes.

Keyboard interactions

Tab, Enter
Focus and follow the product link.

Accessibility

  • The call to action is a native link; without a supplied URL it moves to this section's preview.
  • The illustrative interface has an accessible description and the entrance motion respects reduced-motion preferences.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI block "Hero: centered product overview" with `npx shadcn@latest add @haze/hero-product-overview`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import HeroProductOverview from "@/components/haze/blocks/hero-product-overview.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/hero-product-overview.md

  • Customize with real content

    Adapt the Haze hero-product-overview block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, actionLabel, actionHref, previewLabel, headingLevel, class. Keep the layout, the heading level rules and these accessibility details: The call to action is a native link; without a supplied URL it moves to this section's preview. The illustrative interface has an accessible description and the entrance motion respects reduced-motion preferences. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using hero-product-overview, check it fits: use it when introducing a product with room for a broad interface preview; a single action should lead into the product overview. Avoid it when the introduction needs a form alongside its visual; use hero-split-image. Alternatives: @haze/hero-split-image, @haze/hero-centered.

Dependencies

  • npm: @lucide/astro
  • @haze/button
  • @haze/placeholder
  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog