Device Spotlight
Present a project on desktop and phone mockups that straighten as you scroll past the description.
- Dependencies
- gsap
- Size
- 317 lines
- Controls
- 8 controls
Installation
CLI · shadcn registry
npx shadcn@latest add https://ui.onycx.dev/r/device-spotlight.json1 · Dependencies
npm install gsap2 · Copy the source
components/onycx/device-spotlight.tsx
Requires React 19 and Tailwind CSS v4. Copy the source from the device-spotlight.tsx tab after tweaking: your values are baked in as the new defaults. Exported image examples use portable sample artwork. Replace it with your own media as needed.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow / micro | string | — | '+' eyebrow and the uppercase note on the top row (the note hides at 800px). |
| heading / headingMuted / body | string | — | Heading with a grey second line and a short paragraph; newlines become breaks. |
| image / imageAlt / phoneAlt | string | "/media/architecture-hero/arclight.webp" | Product photograph shown in both screens. |
| barLabel / brand / navLine / screenHeading / screenAccent / footnote | string | — | Mock desktop site; the accent line is italic serif. |
| phoneCaption / phoneSub / phoneAction | string | — | Mock phone layout. |
| stamp / disciplines / linkLabel / linkHref | string / string[] | — | Rotated stamp with the mark, the bottom discipline row and its text link. |
| screenColor / accent / background / ink | string | "#ed4923" / "#ff4d27" / "#d0d1d2" / "#1b1c1d" | Desktop screen, phone panel and focus colour, section surface and text. |
| scrub | number | 1.15 | Seconds of smoothing for both devices. |