# Split Screen

Two to four full-bleed panes that wipe in one after another, each laid out as if it were its own canvas.

```bash
npx shadcn add https://www.reelcn.dev/r/split-screen.json
```

Usage:

```tsx
<SplitScreen labels={["Before", "After"]}>
  <Img src={staticFile("before.png")} style={{ width: "100%", height: "100%", objectFit: "cover" }} />
  <Img src={staticFile("after.png")} style={{ width: "100%", height: "100%", objectFit: "cover" }} />
</SplitScreen>
```

Use for:

- Before and after, side-by-side comparisons, reaction layouts and multi-angle shots
- Showing the same component at two sizes, since each pane has its own viewport

Avoid:

- Arranging several small cards on one canvas, use `bento-grid`

Dependencies:

- `remotion`


## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| delay? | `number` | — | Frames to wait before entering. |
| duration? | `number` | — | Enter duration in frames. Defaults to 0.6s. Some items reuse `duration` for an unrelated local timing. See that item's own prop docs. |
| exit? | `number \| boolean` | — | Exit at the end of the parent `<Sequence>`. `false` keeps it on screen, a number sets the exit length in frames. |
| motion? | `MotionPersonality` | — | Override the theme's motion personality. |
| poster? | `boolean` | — | Renders fully entered, with no exit: for a still frame or thumbnail. Defaults to `false`. |
| holdFrames? | `number` | — | Delays the start of the exit window by this many frames, for a minimum on-screen hold. Defaults to `0`. |
| children | `ReactNode` | — | Two to four panes. Extra children are ignored. |
| labels? | `string[]` | `[]` | One label per pane, shown in its top-left corner. |
| layout? | `"auto" \| "grid" \| "row" \| "column"` | `"auto"` | `auto` puts two or three panes side by side (stacked in portrait) and four in a 2×2 grid. |
| step? | `number` | — | Frames between one pane's wipe and the next. Defaults to 0.12s. |
| background? | `string` | — | Pane fill behind the children. Defaults to the theme surface. |
| dividerColor? | `string` | — | Hairline between panes. Defaults to the theme border. |
| labelColor? | `string` | — | Label text. Defaults to the theme foreground. |
| labelBackground? | `string` | — | Label fill. Defaults to the theme background at 70%. |
| style? | `CSSProperties` | — |  |
| className? | `string` | — |  |