Swipe Deck

A card deck is swiped right, left and up, then an It's a match modal lands with an install button. A free, MIT-licensed Remotion product scene.

Installation
$ pnpm dlx shadcn@latest add @remocn/swipe-deck

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { SwipeDeck } from "@/components/remocn/swipe-deck";
 
const SwipeDeckScene = () => (
  <SwipeDeck
    matchWith="Acme"
    initials="MC"
    lines={["Swipe right on what fits.", "Skip the rest.", "Install the match."]}
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="SwipeDeck"
    component={SwipeDeckScene}
    durationInFrames={360}
    fps={60}
    width={1280}
    height={720}
  />
);

A phone shows a stack of cards: the cursor swipes the first right to like it, the second left to skip it and the third up to super-like it, then an It's a match modal pops in with two avatars, a heart and an Install button. Pass cards (title, meta, chips, and a scene or src), matchWith and initials; lines are the three captions beside the phone. Ships dark by default and light.

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

Props17

PropTypeDefault
cards
SwipeCard[]DEFAULT_CARDS

Deck cards; the first three are swiped, the fourth sits underneath

matchWith
string"remocn"

Name shown in the match modal

initials
string"MC"

Initials on the viewer avatar in the match modal

lines
[string, string, string]—

Three captions beside the phone, one per beat

deckTitle
string"Discover"

Heading at the top of the app screen.

matchTitle
string"It’s a match"

Headline of the match screen.

ctaLabel
string"Install"

Label of the button next to the install command.

accent
string"#3B5BFD"

Accent color for highlights, buttons and progress

ink
string—

Text color; overrides the theme ink.

background
string—

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

fontFamily
string"Figtree"

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 for the whole timeline

theme
"light" | "dark""dark"

Light or dark palette

ground
GshPresetId—

gradients.sh preset id for the backdrop shader

groundParams
Partial<GradientParams>—

Overrides for the backdrop shader parameters

  • cardsSwipeCard[]

    Deck cards; the first three are swiped, the fourth sits underneath

    DefaultDEFAULT_CARDS

  • matchWithstring

    Name shown in the match modal

    Default"remocn"

  • initialsstring

    Initials on the viewer avatar in the match modal

    Default"MC"

  • lines[string, string, string]

    Three captions beside the phone, one per beat

  • deckTitlestring

    Heading at the top of the app screen.

    Default"Discover"

  • matchTitlestring

    Headline of the match screen.

    Default"It’s a match"

  • ctaLabelstring

    Label of the button next to the install command.

    Default"Install"

  • accentstring

    Accent color for highlights, buttons and progress

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • 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"Figtree"

  • 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

  • theme"light" | "dark"

    Light or dark palette

    Default"dark"

  • groundGshPresetId

    gradients.sh preset id for the backdrop shader

  • groundParamsPartial<GradientParams>

    Overrides for the backdrop shader parameters