Device Frame
Browser window and phone frames for screenshots or live UI, with a screen rim that catches the neon.
New in 1.7.Built on Icons.
Pipelines
Last 24 h
- Events
- 1.84M
- Delivered
- 99.96%
- p95 latency
- 212 ms
- billing-eventsStripe → Snowflake412/min
- repo-activityGitHub → Postgres268/min
- support-syncLinear → Slack51/min
- lead-routingWebflow → HubSpot12/min
- error-digestSentry → Slackpaused
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/device-frame.jsonUsage
import { DeviceFrame } from "@/components/ui/device-frame"
<DeviceFrame url="relay.dev/acme/pipelines">
<img src="/dashboard.png" alt="Pipelines dashboard" className="size-full object-cover" />
</DeviceFrame>Examples
Phone
Dynamic island, status bar, side buttons. The switch inside works.
Tabs and minimal controls
Tilted pair
tilt turns each device in perspective; overlap them for a hero shot.
API reference
Children render inside the screen. Also accepts div attributes.
| Prop | Type | Default |
|---|---|---|
variant | "browser"A browser window or a phone. | "browser" |
url | stringBrowser: the address, without the scheme. The host is brighter than the path. | None |
tabs | string[]Browser: tab titles. Adds a tab strip and a toolbar. | None |
activeTab | numberBrowser: the tab in front. | 0 |
controls | "traffic"Browser: colored window buttons, or grey ones. | "traffic" |
cutout | "island"Phone: the cut-out at the top of the screen. | "island" |
time | stringPhone: shows a status bar with this time, e.g. "9:41". | None |
tilt | booleanTurn it in perspective. true is 10°; negative turns the other way. | None |
aspectRatio | stringAspect ratio of the screen. | "16 / 10" or "9 / 19.5" |
rim | booleanThe hairline of --neon where the screen glass meets the frame. | true |
screenClassName | stringClass names for the screen. | None |
color | NeonColorColor the rim reflects. | inherited |
Accessibility
- The frame is decoration: window buttons, tabs, the URL bar, the island and the side buttons are aria-hidden or plain text. Whatever you put on the screen keeps its own semantics, so give screenshots alt text.
- The screen is a size container. Size the content in cqw and it scales with the frame like a screenshot; size it in px and it reflows like a real viewport.
- The phone is sized in cqw of its own width, so one width class scales the bezel, island and buttons together.
- The rim is light caught on the glass edge, not a glow: a 1px tint of --neon with a brighter line along the top. Nothing spills outward.