Card Fan

A stack of colored format cards fans out, one card lifts forward, and a caption writes in below. A free, MIT-licensed Remotion UI block.

Installation
$ pnpm dlx shadcn@latest add @remocn/card-fan

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { CardFan } from "@/components/remocn/card-fan";
 
const CardFanScene = () => (
  <CardFan
    title="Your top formats"
    accentWord={2}
    pick={1}
    caption="Launch films are 41% of this month’s renders"
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="CardFan"
    component={CardFanScene}
    durationInFrames={264}
    fps={60}
    width={1280}
    height={720}
  />
);

A title writes in while a stack of cards drops, fans out, and lifts the pick card forward. A caption then writes in word by word. Pass your own title (with accentWord tinting one word), up to six cards, the pick index and the caption; it ships light and dark through theme.

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

Props16

PropTypeDefault
title
string"Your top formats"

Title above the fan.

accentWord
number2

Index of the title word shown in the accent color.

cards
{ label: string; color: string; meta?: string; glyph?: 'launch' | 'list' | 'play' | 'cursor' | 'spark' }[]DEFAULT_CARDS

Two to six cards. Glyph is one of launch, list, play, cursor, spark.

pick
number0

Zero-based index of the card that lifts forward.

caption
string"Launch films are 41% of this month’s renders"

Line of text written in under the fan.

theme
"dark" | "light""dark"

Color scheme. Ships light and dark.

ink
string—

Text color override.

ground
GshPresetId—

Shader preset id for the animated background.

groundParams
Partial<GradientParams>—

Partial shader parameters that override the ground preset.

background
string—

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

fontFamily
string"Onest"

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

stagger
number3

Frames between title words as the title rises in.

blur
number3

Blur in pixels on the cards that step back when one is picked.

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.

  • titlestring

    Title above the fan.

    Default"Your top formats"

  • accentWordnumber

    Index of the title word shown in the accent color.

    Default2

  • cards{ label: string; color: string; meta?: string; glyph?: 'launch' | 'list' | 'play' | 'cursor' | 'spark' }[]

    Two to six cards. Glyph is one of launch, list, play, cursor, spark.

    DefaultDEFAULT_CARDS

  • picknumber

    Zero-based index of the card that lifts forward.

    Default0

  • captionstring

    Line of text written in under the fan.

    Default"Launch films are 41% of this month’s renders"

  • theme"dark" | "light"

    Color scheme. Ships light and dark.

    Default"dark"

  • inkstring

    Text color override.

  • groundGshPresetId

    Shader preset id for the animated background.

  • groundParamsPartial<GradientParams>

    Partial shader parameters that override the ground preset.

  • backgroundstring

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

  • fontFamilystring

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

    Default"Onest"

  • staggernumber

    Frames between title words as the title rises in.

    Default3

  • blurnumber

    Blur in pixels on the cards that step back when one is picked.

    Default3

  • 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