Skip to content
caliper ui pro docs

Image viewer

A full-size viewer with zoom and keyboard navigation.

Pro

When to use

  • Opening a thumbnail to look closely.

When not to use

  • The image is decoration.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/image-viewer

Adds its 4 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

ImageViewer

3 props
PropTypeDefault
label *string—
images *readonly ViewerImage[]—
classNamestring—

Keyboard

←
Moves to the previous item or value.
→
Moves to the next item or value.
↑
Moves to the previous item or value.
↓
Moves to the next item or value.

Accessibility

It exposes group and status semantics, with aria-label, aria-hidden and aria-pressed 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/image-viewer.md

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

More in Media