Flick Swap

A headline flicks up on a scrolling rail to swap between items, each with a label and a highlighted phrase. A free, MIT-licensed Remotion text animation.

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

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { FlickSwap } from "@/components/remocn/flick-swap";
 
const FlickSwapScene = () => (
  <FlickSwap
    items={[
      { label: "Captions", headline: "Every word lands on the beat.", highlight: "on the beat" },
      { label: "Transitions", headline: "Cuts that feel expensive.", highlight: "expensive" },
    ]}
    dwell={28}
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="FlickSwap"
    component={FlickSwapScene}
    durationInFrames={300}
    fps={60}
    width={1280}
    height={720}
  />
);

A rail on the side marks position while headlines scroll upward with a quick flick and settle, holding for dwell frames each. Pass items as label, headline and highlight objects; it ships light and dark through theme.

Props12

PropTypeDefault
items
FlickSwapItem[]DEFAULT_ITEMS

List of items with label, headline and highlight phrase

dwell
number28

Frames each item stays still between flicks

fontWeight
number500

Weight of the headlines.

blur
number1

Strength of the motion blur on a flick; 0 turns it off.

accent
string"#3B5BFD"

Accent color (any valid CSS color)

ink
string—

Text color; overrides the theme ink.

background
string—

Overrides the theme's stage color

fontFamily
string"Bricolage Grotesque"

Typeface for the copy. Load the font 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

theme
"dark" | "light""dark"

Ships light and dark palettes

  • itemsFlickSwapItem[]

    List of items with label, headline and highlight phrase

    DefaultDEFAULT_ITEMS

  • dwellnumber

    Frames each item stays still between flicks

    Default28

  • fontWeightnumber

    Weight of the headlines.

    Default500

  • blurnumber

    Strength of the motion blur on a flick; 0 turns it off.

    Default1

  • accentstring

    Accent color (any valid CSS color)

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Overrides the theme's stage color

  • fontFamilystring

    Typeface for the copy. Load the font in your project first.

    Default"Bricolage Grotesque"

  • 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

    Default1

  • theme"dark" | "light"

    Ships light and dark palettes

    Default"dark"