# Chat To Preview Layout

Chat input transforms into a preview layout.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## Installation

<TabsTrigger value="cli">Command</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>

```bash
npx shadcn@latest add @framecn/chat-to-preview-layout
```

<Step>Copy and paste the following code into your project.</Step>

<Step>Update the import paths to match your project setup.</Step>

## Usage

```tsx
import { ChatToPreviewLayout } from "@/components/framecn/chat-to-preview-layout";
```

```tsx
<ChatToPreviewLayout />
```

## API Reference

### ChatToPreviewLayout

| Prop               | Type        | Default     |
| ------------------ | ----------- | ----------- |
| `chat`             | `ReactNode` | `-`         |
| `preview`          | `ReactNode` | `-`         |
| `startChatRatio`   | `number`    | `0.5`       |
| `endChatRatio`     | `number`    | `0.25`      |
| `background`       | `string`    | `"#0a0a0a"` |
| `speed`            | `number`    | `1`         |
| `fps`              | `number`    | `30`        |
| `durationInFrames` | `number`    | `150`       |
| `width`            | `number`    | `1280`      |
| `height`           | `number`    | `720`       |
| `className`        | `string`    | `-`         |