# Device Frame

> A phone, tablet, laptop or watch drawn around real content.

Monochrome hardware so the screen is the subject, with an optional tilt toward the pointer. Live components, not only screenshots.

- Family: Chrome
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/device-frame/
- Licence: https://galactrex.com/ui/license/

## Install

```sh
npx @galactrex/ui login   # once, with an API key from https://galactrex.com/account/
npx @galactrex/ui add device-frame
```

It installs to `components/galactrex/device-frame.tsx`, with the shared motion helpers beside it. First time in a project: `npx @galactrex/ui init` (setup guide: https://galactrex.com/docs/ui-components-setup/).

## Usage

```tsx
import { DeviceFrame } from "@/components/galactrex/device-frame";

<DeviceFrame device="phone"><AppScreen /></DeviceFrame>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | — | Screen content. |
| `device` | `"phone" \| "tablet" \| "laptop" \| "watch"` | `"phone"` | Device. |
| `tilt` | `boolean` | `true` | Tilt toward the pointer. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Four devices.** Phone, tablet, laptop, watch.

## Accessibility

- Frame is decorative; content inside keeps its own semantics.

## Motion

- Spring tilt from motion values.
- Touch and reduced motion: flat.
