Image Showcase
An editorial image story: a lead photograph with its caption and credit, the facts and actions that give it context, and a gallery for the rest of the set.
The lead image keeps the zoom behaviour, so a reader can open it without leaving the story. Images after the first become the gallery, which owns the roving-focus thumbnails; the block itself only supplies the label.
Preview
Around the Moon
A lead photograph with its caption and credit, the facts that give it context, and a gallery for the rest of the set.
The opening of the sample clip.
Installation
Add the item with the shadcn CLI, or copy the source manually.
pnpm dlx shadcn@latest add litingyes/blocove/image-showcaseRequires 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-showcase
Usage
import { ImageShowcase } from "@/components/blocove/image-showcase"
export function MissionStory() { return ( <ImageShowcase eyebrow="Photo essay" title="Around the Moon" description="Four stills from the launch trailer." credit="NASA" meta={["Four stills", "Artemis II"]} href="https://images.nasa.gov/" images={[ { src: "/lead.jpg", alt: "The launch vehicle on the pad", caption: "A still from the trailer." }, { src: "/detail.jpg", alt: "A detail of the launch vehicle" }, { src: "/liftoff.jpg", alt: "The launch" } ]} /> )}API Reference
Props accepted by the exported components.
ImageShowcase
An editorial image story: a lead photograph with its caption and credit, a facts and actions row, and a gallery for the rest of the set.
| Prop | Type | Default |
|---|---|---|
title | string | Required |
images | readonly ImageShowcaseItem[] | Required |
eyebrow | string | - |
description | string | - |
credit | ReactNode | - |
meta | string[] | - |
actions | ReactNode | - |
href | string | - |
aspectRatio | number | string | '16 / 9' |
widths | readonly number[] | - |
transform | (src, width) => string | Identity |
sizes | string | - |
className | string | - |
ImageShowcaseItem
One image in the story; the first one leads the block.
| Prop | Type | Default |
|---|---|---|
src | string | Required |
alt | string | Required |
thumbnailSrc | string | src |
caption | ReactNode | - |