Peek preview
A look without leaving the list: press and hold a row and its preview rises from where you pressed; let go and it sinks back. Shift+Space from the keyboard.
- Press and hold, or Shift and Space, to preview.
- Press and hold, or Shift and Space, to preview.
- Press and hold, or Shift and Space, to preview.
3 unread · last checked 09:41
When to use
- Mail, files and messages people triage.
- Lists where opening an item costs a page load.
When not to use
- The only way to read an item; a click must still open it.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/peek-preview
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
PeekPreview
6 props
PropTypeDefaultDescription
label *string—What the row is, e.g. the message subject.
preview *ReactNode—
onOpen(() => void)—A normal click: open the item properly.
holdMsnumber380
classNamestring—
children *ReactNode—
Keyboard
- Space
- Activates the focused control.
- Escape
- Closes or cancels, then returns focus to where it came from.
Accessibility
It exposes dialog semantics, with aria-describedby, aria-expanded and 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/peek-preview.mdThe index of every part is at /llms.txt.