Image Hero

A hero section with a full-bleed photograph behind a gradient: an eyebrow, a headline, supporting copy and calls to action.

Blocksimage-heroView JSON

The block is the shipped `Image` behind a gradient, so the copy stays legible over any photograph and the box keeps its ratio before the file arrives. Pass `priority` only when the hero is the first thing on the page; the image loads eagerly by default.

Preview

The launch vehicle on the pad
Image family

A hero that reserves its own space

One frame, four widths, no layout shift while it loads.

Installation

Add the item with the shadcn CLI, or copy the source manually.

pnpm dlx shadcn@latest add litingyes/blocove/image-hero

Requires a shadcn/ui project set up with Base UI primitives. Blocove is developed against the b0 preset, but it installs no base config or theme tokens: your own preset, fonts and colors stay in place.

Or install from the namespace after adding the registry: npx shadcn@latest add @blocove/image-hero

Usage

Use the block
import { ImageHero } from "@/components/blocove/image-hero"
export function MissionHero() {  return (    <ImageHero      src="/hero.jpg"      alt="The launch vehicle on the pad"      eyebrow="Image family"      title="A hero that reserves its own space"      description="One frame, four widths, no layout shift while it loads."      actions={<a href="/missions">Read the mission</a>}    />  )}

API Reference

Props accepted by the exported components.

ImageHero

A full-bleed photograph behind a gradient, with the eyebrow, headline, description and actions in the lower left corner. The image is a priority image by default.

PropTypeDefault
srcstringRequired
altstringRequired
titlestringRequired
eyebrowstring-
descriptionstring-
actionsReactNode-
prioritybooleantrue
aspectRationumber | string'16 / 9'
widthsreadonly number[]-
transform(src, width) => stringIdentity
sizesstring'100vw'
classNamestring-