Skip to content

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

3.3 KB
Raw Blame
---
title: Macro Letter Pan
description: "A macro camera hops across the letters of a key word, then pulls back to reveal the full phrase."
component: macro-letter-pan
vibe: premium
length: 84
useWhen:
  - "A closing line where one word is the payoff and the camera should dwell on it before revealing the sentence."
  - "A premium, cinematic title beat set over a soft gradient ground."
  - "A call to action whose key word should land in the accent color after the pull-back."
avoidWhen:
  - "You want the pan to end on a serif headline with a gradient fill - use `macro-pan`."
  - "The line should stay fully readable throughout - use `focus-pan-text` to keep earlier lines visible."
  - "A quick fade-in is enough for the line - use `soft-blur-in`."
askedAs:
  - "camera hopping across letters"
  - "I want a macro lens jumping letter to letter then pulling back"
  - "closing line where one word is the payoff before revealing the sentence"
  - "premium close up on a key word"
  - "macro camera on text"
  - "zoom out to full phrase"
---

<ComponentPreview name="macro-letter-pan" />

<InstallBlock name="macro-letter-pan" />

## Usage

```tsx
// src/Root.tsx
import { Composition } from "remotion";
import { MacroLetterPan } from "@/components/remocn/macro-letter-pan";

const MacroLetterPanScene = () => (
  <MacroLetterPan line="Ship it today." word="today" firstShot={12} />
);

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

The camera cuts between tight close-ups of letter pairs inside `word`, each shot shorter than the last, then springs back to show the whole `line`, with the key word tinting to the accent color. Pass `line` and `word` (a substring of the line). It takes a `theme` prop and ships light and dark.

The ground is a live gradients.sh shader (`GshGround`), installed with the component as `@remocn/gsh`. Pick another look with the `ground` preset prop.

<PropsTable title="Props"
  rows={[
    {
      name: "line",
      type: "string",
      default: "\"Ready to launch.\"",
      description: "The full phrase revealed after the pan.",
    },
    {
      name: "word",
      type: "string",
      default: "\"launch\"",
      description: "The substring of the line the camera pans across.",
    },
    {
      name: "accent",
      type: "string",
      description: "Color the key word turns after the pull-back.",
    },
    {
      name: "ink",
      type: "string",
      description: "Text color; defaults to the theme ink.",
    },
    {
      name: "theme",
      type: "\"dark\" | \"light\"",
      default: "\"dark\"",
      description: "Light or dark ground; the component ships both.",
    },
    {
      name: "ground",
      type: "GshPresetId",
      description: "Gradient preset id used as the background.",
    },
    {
      name: "groundParams",
      type: "Partial<GradientParams>",
      description: "Overrides for the background gradient parameters.",
    },
    {
      name: "firstShot",
      type: "number",
      default: "15",
      description: "Frames of the first close-up; later shots get shorter.",
    },
    {
      name: "maxShots",
      type: "number",
      default: "6",
      description: "Maximum number of close-up shots before the pull-back.",
    },
  ]}
/>