Flick Swap

A headline flicks up on a scrolling rail to swap between items, each with a label and a highlighted phrase.

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={150}
    fps={30}
    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.

Props6

PropTypeDefault
items
FlickSwapItem[]DEFAULT_ITEMS

List of items with label, headline and highlight phrase

dwell
number28

Frames each item stays still between flicks

accent
string"#3B5BFD"

Accent color (any valid CSS color)

background
string—

Overrides the theme's stage color

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

  • accentstring

    Accent color (any valid CSS color)

    Default"#3B5BFD"

  • backgroundstring

    Overrides the theme's stage color

  • speednumber

    Playback speed multiplier

    Default1

  • theme"dark" | "light"

    Ships light and dark palettes

    Default"dark"