Skip to content
caliper ui pro docs

Photo grid

A grid of photos that opens in a viewer.

Pro

When to use

  • Browsing an album.

When not to use

  • The images are of very different shapes and need to be uncropped.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/photo-grid

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

PhotoGrid

6 props
PropTypeDefault
photos *readonly Photo[]—
label *string—
targetHeightnumber180
gapnumber6
onOpen((id: string) => void)—
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes list and listitem semantics, with aria-label kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/photo-grid.md

The index of every part is at /llms.txt.

More in Media viewers