Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

4.1 KB
Raw Blame
---
title: v0
description: Animated Vercel v0 composer that types a prompt and morphs the mic button into a send button
component: v0
vibe: tech
length: 150
useWhen:
  - "Depicting the Vercel v0 composer as a recognizable branded surface in a generative-UI demo."
  - "A build prompt should type itself in with the mic→send button morph as the action beat."
  - "The scene wants the v0 product surface specifically, not a generic chat box."
avoidWhen:
  - "You're depicting a different product — use the matching card (`chat-gpt`, `claude-chat`, `claude-code`, `opencode`)."
  - "You need a general AI chat exchange rather than a prompt composer — use `chat-gpt` or `claude-chat`."
  - "You only need a typed input with a cursor and no app chrome — use `typewriter`."
askedAs:
  - "vercel v0 prompt box"
  - "generative UI composer"
  - "I want the v0 input typing a prompt and the mic becoming send"
  - "show prompt to interface tool from Vercel starting a build"
  - "opening a generate-a-UI demo with a typed request"
  - "beat where someone describes an app to v0"
---

<ComponentPreview name="v0" />

<InstallBlock name="v0" />

<Note>
  Installing `v0` pulls the `caret` primitive and the `remocn-ui` core lib (which provides the shared `useTypewriter` hook) via `registryDependencies`, plus the `Inter` font via `@remotion/google-fonts` automatically. No additional install needed.
</Note>

## Usage

Standalone in a Remotion `<Composition>` — renders immediately after install:

```tsx
// src/Root.tsx
import { Composition } from "remotion";
import { V0 } from "@/components/remocn/v0";

const V0Scene = () => (
  <V0
    greeting="What do you want to create?"
    placeholder="Ask v0 to build…"
    prompt="a landing page for my SaaS with pricing and testimonials"
    modelName="v0 Max"
    projectName="Project"
    speed={1}
  />
);

export const RemotionRoot = () => (
  <Composition
    id="V0"
    component={V0Scene}
    durationInFrames={150}
    fps={30}
    width={1280}
    height={720}
  />
);
```

Timeline: heading + box ease in (0–16), default state with blinking caret holds (16–42), the prompt types in from frame 42, the white mic button morphs into a send button the instant text appears, then holds to the end.

### With Backdrop

Renders transparent and single-theme — supply the background via `Backdrop`; edit the copied file to re-theme:

```tsx
import { Backdrop } from "@/components/remocn/backdrop";
import { V0 } from "@/components/remocn/v0";

<Backdrop fill={{ type: "color", value: "#000000" }}>
  <V0
    greeting="What do you want to create?"
    prompt="a landing page for my SaaS with pricing and testimonials"
    modelName="v0 Max"
  />
</Backdrop>
```

<PropsTable title="Props"
  rows={[
    {
      name: "greeting",
      type: "string",
      default: "\"What do you want to create?\"",
      description: "Bold heading above the box",
    },
    {
      name: "placeholder",
      type: "string",
      default: "\"Ask v0 to build…\"",
      description: "Muted placeholder before typing",
    },
    {
      name: "prompt",
      type: "string",
      default: "\"a landing page for my SaaS with pricing and testimonials\"",
      description: "The text that types in character-by-character",
    },
    {
      name: "modelName",
      type: "string",
      default: "\"v0 Max\"",
      description: "Model chip label in the toolbar",
    },
    {
      name: "projectName",
      type: "string",
      default: "\"Project\"",
      description: "Project selector label",
    },
    {
      name: "speed",
      type: "number",
      default: "1",
      description: "Animation speed multiplier (minimum 1 so the prompt finishes typing)",
    },
  ]}
/>

## Notes

- **Dark by default:** Defaults to the dark v0 look.
- **Button morph:** The mic-to-send morph is gated purely on text presence — the moment the prompt has any characters, the send button appears.
- **Offline-friendly:** No network requests or images are used, so the preview works offline and MP4 export requires no CORS setup.
- **Shared hook:** Reuses the `useTypewriter` hook and the `caret` primitive shared with the other chat components.