Skip to content
Hazine

Framed Screenshot Hero

Heading, two-weight description and actions above one product screenshot held in a window frame, with separate light and dark image sources. Use it as the default product-led hero.

How it differs. Text stack on top and a single window frame below it, fully visible inside the page width: title bar, hairline and a raised mat in place of a shadow.

Install

pnpm dlx shadcn@latest add @hazine/hero-framed-screenshot

Adds 1 file, 3 shadcn primitives (aspect-ratio, 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.

Props15

announcement
string | null = "Swap requests now settle on their own"
Short line in a badge above the heading. Pass null to leave it out.
title
string = "Fill every shift before the week starts"
lead
string | null = "Coverboard lists each open shift with the people qualified to take it."
Opening clause of the description, set in the foreground colour. Pass null to leave it out.
description
string = "It prices the cover before you ask, so the rota is settled on Friday and nobody is phoned on Monday morning."
primaryAction
HeroAction = DEFAULT_PRIMARY_ACTION
secondaryAction
HeroAction | null = DEFAULT_SECONDARY_ACTION
Pass null to render a single action.
footnote
string | null = "Free for teams of up to 10. No card needed."
One line of reassurance under the actions. Pass null to leave it out.
image
HeroScreenshot
The product screenshot. Without it, and without `media`, the frame shows a sample view drawn from theme tokens.
media
React.ReactNode
Replaces the screenshot inside the frame, for a video or a live fragment. It brings its own accessible name.
windowTitle
string = "coverboard.example/northgate/week-46"
Text in the title bar. The whole bar is decorative and hidden from assistive technology.
caption
string | null = "The week view: open shifts on one side, who can cover them on the other."
Visible caption under the frame. Pass null to leave it out.
align
"center" | "start" = "center"
imageLoading
"lazy" | "eager" = "lazy"
Use "eager" when the hero is the first thing on the page, so the screenshot is not deferred.
locale
string = "en-US"
Formats the dates and figures of the sample view. It has no effect once `image` or `media` is set.
headingLevel
HeadingLevel = 1
Defaults to 1 because a hero usually opens the page. Lower it when the page already has a level 1 heading.

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 screenshot is a figure with a caption and descriptive alt text (the built-in sample view is one labelled image), the window title bar is hidden from assistive technology, and the actions are links.

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

Dependencies5

  • aspect-ratio
  • 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.

More in Heroes