Product gallery
A main image with thumbnails for a product.

Picture 1 of 3
When to use
- Showing several photos of one product.
- Thumbnails should be reachable by keyboard.
When not to use
- A single image; use the image viewer.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/product-gallery
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
ProductGallery
5 props
PropTypeDefault
images *readonly GalleryImage[]—
valuestring—
defaultValuestring—
onValueChange((id: string) => void)—
classNamestring—
Keyboard
- →
- Moves to the next item or value.
- ←
- Moves to the previous item or value.
- Home
- Jumps to the first item or the minimum.
- End
- Jumps to the last item or the maximum.
Accessibility
It exposes tablist, tab and status semantics, with aria-hidden, aria-pressed, aria-label and aria-selected kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/product-gallery.mdThe index of every part is at /llms.txt.

