Dynamic Split Screen
Cinematic two-column split where one panel shrinks and the other expands into view
Installation
$ pnpm dlx shadcn@latest add @remocn/chat-to-preview-layoutUsage
// src/Root.tsx
import { Composition } from "remotion";
import { ChatToPreviewLayout } from "@/components/remocn/chat-to-preview-layout";
const ChatToPreviewLayoutScene = () => (
<ChatToPreviewLayout
chat={<MyChat />
);
export const RemotionRoot = () => (
<Composition
id="ChatToPreviewLayout"
component={ChatToPreviewLayoutScene}
durationInFrames={120}
fps={30}
width={1280}
height={720}
/>
);Props
| Prop | Type | Default | Description |
|---|---|---|---|
chat | ReactNode | — | The chat panel. Falls back to a sample chat mockup. |
preview | ReactNode | — | The preview panel. Falls back to a sample landing page mockup. |
startChatRatio | number | 0.5 | Initial fraction of width given to the chat panel (0..1) |
endChatRatio | number | 0.25 | Final fraction of width given to the chat panel (0..1) |
background | string | "#0a0a0a" | Outer background color |
className | string | — | Optional className for the outer container |