Frame
Frame: Interactive browser/device mockup frame with viewport size toggles (desktop, tablet, mobile) and smooth layout resizing. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Frame
npx motion-ui-skill add frameComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxlucide-reactmotionreacttailwind-merge
Source files
Frame
Interactive browser/device mockup frame with viewport size toggles (desktop, tablet, mobile) and smooth layout resizing. Inspired by KeenThemes ReUI and ibelick/ui-skills.
Install
npx motion-ui-skill add frame
Dependencies
clsxlucide-reactmotionreacttailwind-merge
Usage
"use client";
import { Frame } from "@/components/motion/frame";
export function FrameExample() {
return (
<div className="p-8">
<Frame url="https://acme.inc/dashboard" defaultViewport="desktop">
<div className="p-6 space-y-4">
<h1 className="text-xl font-bold">Analytics Dashboard</h1>
<p className="text-sm text-muted-foreground">
Responsive preview of the application layout across multiple breakpoints.
</p>
</div>
</Frame>
</div>
);
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
url |
string |
"https://acme.inc" |
Address bar URL text. |
defaultViewport |
"desktop" | "tablet" | "mobile" |
"desktop" |
Initial viewport width mode. |
children |
React.ReactNode |
Required | Content rendered inside the mockup frame. |
className |
string |
undefined |
Outer container classes. |