Focus Front Swap

Three-line pitch with a focus pull for Remotion: each line sharpens forward while the last one blurs back, ending on a logo and a ship-it call, over a shader ground.

In Remotion, Focus Front Swap makes a three-line pitch where focus shifts from line to line: the old line blurs back while the next one comes forward, finishing on a logo and a ship-it call. Use it for a rhythmic pitch beat at the end of a launch or product video.

Installation
$ pnpm dlx shadcn@latest add @remocn/focus-front-swap

How to build this in Remotion

You don't need @remotion/transitions or a blur filter per Sequence. Install the component and pass your lines:

bash
npx shadcn@latest add @remocn/focus-front-swap

It is one scene: the lines' fronts, the push and the logo are placed by timeline.ts, the depth moves are interpolate() with Easing, the logo lands with spring(), and the focus is a CSS blur() filter. Line widths are measured before the first frame, held with delayRender. The ground is a live gradients.sh shader (GshGround).

Good to know

  • Length: 122 frames of motion at 30 fps (244 at 60 fps) with the default props. The demo plays 150 frames, which adds a hold. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate.
  • Installs: remotion, @remotion/google-fonts from npm, plus the remocn helpers gsh, glide, frame-rate, timeline. The shadcn CLI copies the source into your project.
  • Font: loads Geist and Manrope itself through @remotion/google-fonts. Pass fontFamily to use your own face, and load that font in your project.
  • The logo is a separate element under the final line, not one of the lines: the last line is the ship-it call (default Ship it {tonight}., with the braces marking the accent word). logo is a boolean that shows or hides the built-in Remocn mark; to show your own logo, replace the RemocnLogo element in the copied file.

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { FocusFrontSwap } from "@/components/remocn/focus-front-swap";
 
const FocusFrontSwapScene = () => (
  <FocusFrontSwap lines={["Remocn knows the beat", "You describe it once", "Ship it {tonight}."]} logo={false} />
);
 
export const RemotionRoot = () => (
  <Composition
    id="FocusFrontSwap"
    component={FocusFrontSwapScene}
    durationInFrames={300}
    fps={60}
    width={1280}
    height={720}
  />
);

Each line in lines sharpens into focus while the previous one blurs back, and a mark appears under the final line. Wrap a word in {} such as {tonight} to accent it, and set logo={false} to drop the mark.

The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop. It ships in light and dark through the theme prop.

Props15

PropTypeDefault
lines
string[]—

Headlines in order; wrap a word in curly braces to accent it.

accent
string—

Accent color override; falls back to the theme accent.

ink
string—

Text color override; falls back to the theme ink.

logo
booleantrue

Show the logo mark after the last line.

theme
"dark" | "light""dark"

Ships light and dark; picks the palette.

ground
GshPresetId—

Gradient ground preset id for the backdrop.

groundParams
Partial<GradientParams>—

Partial gradient parameters that tweak the chosen ground preset.

swap
numberBEAT.swap

Frames between focus pulls.

blur
number18

Maximum blur radius in pixels for out-of-focus lines.

fontWeight
number300

Weight of the lines.

background
string—

Solid fill in place of the gradient ground; pass "transparent" to drop it.

fontFamily
string"Geist"

Typeface for the copy. Geist loads by default; load any other face in your project first.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

speed
number1

Playback speed multiplier for the whole timeline.

  • linesstring[]

    Headlines in order; wrap a word in curly braces to accent it.

  • accentstring

    Accent color override; falls back to the theme accent.

  • inkstring

    Text color override; falls back to the theme ink.

  • logoboolean

    Show the logo mark after the last line.

    Defaulttrue

  • theme"dark" | "light"

    Ships light and dark; picks the palette.

    Default"dark"

  • groundGshPresetId

    Gradient ground preset id for the backdrop.

  • groundParamsPartial<GradientParams>

    Partial gradient parameters that tweak the chosen ground preset.

  • swapnumber

    Frames between focus pulls.

    DefaultBEAT.swap

  • blurnumber

    Maximum blur radius in pixels for out-of-focus lines.

    Default18

  • fontWeightnumber

    Weight of the lines.

    Default300

  • backgroundstring

    Solid fill in place of the gradient ground; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy. Geist loads by default; load any other face in your project first.

    Default"Geist"

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1

Common questions

How can I make a three-line pitch in Remotion where focus shifts from line to line?

Install Focus Front Swap with npx shadcn@latest add @remocn/focus-front-swap and pass three lines. Each new line sharpens forward while the last one blurs back, then a mark lands under the final line.

Not through a prop: logo only toggles the built-in mark. Swap the RemocnLogo element in the copied file for your SVG or Img, or set logo={false}.

How do I accent one word?

Wrap it in braces inside the line, such as Ship it {tonight}.

  • Layout Swap: lines swap by shifting layout rather than depth.
  • Pass Swap: a moving object swaps the lines.
  • Pinned Word: one keyword stays fixed while the words around it change.
  • Focus Pan Text: focus pans down through status lines.