Device frame
Show live UI inside a laptop or a phone. The lid opens and the whole device turns, but the screen is an ordinary subtree laid out at the device's true width (1280 or 390 pixels) inside a size container, so breakpoints and container queries behave exactly as in the product.
Halden · Oct 2026
Overview
Revenue, 8 weeks
- Acme CoTeam$199
- NorthwindPro$99
- InitechPro$99
When to use
- Docs and pages that preview a responsive screen.
- Comparing the same screen on a laptop and a phone.
When not to use
- A hero image. Use real UI so the preview stays honest.
- Screens with state you cannot lose: changing device remounts the content.
Installation
pnpm dlx shadcn@latest add @caliper/device-frame
Adds its 7 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
DeviceFrame
14 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements and keeps aria-hidden, aria-pressed, aria-label and aria-valuetext 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/device-frame.mdThe index of every part is at /llms.txt.