# Live Code Compilation

Split-screen where typed code on the left snaps a live UI preview on the right.

> 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/live-code-compilation
```

<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 { LiveCodeCompilation } from "@/components/framecn/live-code-compilation";
```

```tsx
<LiveCodeCompilation />
```

## API Reference

### LiveCodeCompilation

| Prop               | Type     | Default     |
| ------------------ | -------- | ----------- |
| `accentColor`      | `string` | `"#3b82f6"` |
| `speed`            | `number` | `1`         |
| `fps`              | `number` | `30`        |
| `durationInFrames` | `number` | `290`       |
| `width`            | `number` | `1280`      |
| `height`           | `number` | `900`       |
| `className`        | `string` | `-`         |

## Notes

  Code typing on the left triggers live UI updates on the right. Great for code
  editor or developer tool demos.