Tapas UI
Esc
  • IntroductionGetting startedWhat Tapas UI is and where to start.
  • InstallationGetting startedSet up shadcn/ui and add your first section.
  • CLI & AI agentsGetting startedThe shadcn CLI, the @tapas namespace, the MCP server and AI prompts.
  • TemplatesGetting startedWhole pages built from sections, installed with one command.
  • Demo sitesGetting startedThree fictional sites built only from Tapas sections.
  • ThemingCustomizationHow sections pick up your colors and radius.
  • ColorsCustomizationEvery CSS variable sections read, what it is for and where it is used.
  • Dark modeCustomizationSections follow your .dark variables.
  • MotionCustomizationPlain and motion versions, reduced motion and pause controls.
  • AccessibilityCustomizationWhat every section guarantees.
  • Waitlist formsGuidesPost signups to your own API route and store them.
  • Checkout linksGuidesPoint pricing buttons at Stripe payment links or any URL.
Menu
Browse the docs

DocsProduct story

Device frame

A browser window or phone frame around any content, with a soft layered shadow.

Preview

Version
Preview theme color
More themes

The frame tilts in 3D toward a mouse pointer, a soft highlight follows the pointer and the glow behind shifts the other way; on leave it springs back flat with a little overshoot. There is no tilt on touch screens or for keyboard users, who lose nothing. With reduced motion turned on, it renders the plain layout.

example.com/stats
example.com/stats

Installation

Run this in a project that already uses shadcn/ui. It adds the component and anything it needs; the motion version also adds the plain one and the motion package.

Usage

import { DeviceFrame } from "@/components/custom/device-frame";

<DeviceFrame device="browser" url="yourproduct.com">
  <img src={screenshotUrl} alt="The dashboard" />
</DeviceFrame>

<DeviceFrame device="phone">
  <img src={mobileUrl} alt="The mobile app" />
</DeviceFrame>
import { DeviceFrameMotion } from "@/components/custom/device-frame/device-frame-motion";

<DeviceFrameMotion device="phone">{children}</DeviceFrameMotion>

Props

PropTypeDefaultDescription
device"browser" | "phone""browser"Which frame to draw.
urlstring–Text in the browser's address bar. Ignored for the phone.
children* (required)ReactNode–What the device shows: an image, a video or a live component.
...propsReact.ComponentProps<"div">–Any other div attribute (id, aria-*, data-*, ref) goes to the root element.
PropTypeDefaultDescription
device"browser" | "phone""browser"Which frame to draw.
urlstring–Text in the browser's address bar. Ignored for the phone.
children* (required)ReactNode–What the device shows: an image, a video or a live component.
...propsReact.ComponentProps<"div">–Any other div attribute (id, aria-*, data-*, ref) goes to the root element.

Accessibility

  • The frame is decoration; give the content its own text alternative.
  • Content inside stays interactive: links and buttons in a live component still work.
  • The motion version follows the visitor's reduced-motion setting and never hides content before it animates.