---
title: "Frame | Free React & Tailwind Blocks Component | Motion UI"
canonical: "https://blacknest.dev/motion/c/blocks/frame"
github_source: "https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/frame.tsx"
install_command: "npx motion-ui-skill add frame"
dependencies: ["clsx","lucide-react","motion","react","tailwind-merge"]
category: "blocks"
subcategory: "motion"
---

# 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

```bash
npx motion-ui-skill add frame
```

## Dependencies

- `clsx`
- `lucide-react`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"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. |

## Source Files

- [components/motion/frame.tsx](https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/frame.tsx)
- [lib/ease.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/ease.ts)
- [lib/hooks/use-haptic.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/hooks/use-haptic.ts)
- [lib/utils.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/utils.ts)
