Price Slate

An old price is struck through and set aside while the new price spins in on digit reels. A free, MIT-licensed Remotion number animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/price-slate

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { PriceSlate } from "@/components/remocn/price-slate";
 
const PriceSlateScene = () => <PriceSlate price="$0" was="$29" lead="From" note="per seat, billed yearly" />;
 
export const RemotionRoot = () => (
  <Composition
    id="PriceSlate"
    component={PriceSlateScene}
    durationInFrames={140}
    fps={30}
    width={1280}
    height={720}
  />
);

A serif lead-in and the old price reel in; a line strikes the old price through, then it shrinks, greys out and slides aside while the new price spins in on digit reels and a gradient sweeps across it. A note and an availability line rise in last. Pass price, was, lead, note, availability and product; use name or logo for the mark at the top. It ships light and dark through theme.

Props18

PropTypeDefault
price
string"$0"

The new price, set huge. Digits roll in on reels.

was
string"$29"

The old price, shown first, struck through, then set aside.

lead
string"From"

Serif italic lead-in before the prices.

note
string"per seat · billed yearly"

Small line under the price.

availability
string"Available today"

Availability line at the foot of the slate.

product
string"Pro"

Product name after the logo at the top; empty hides it.

name
string"remocn"

Brand at the top; "remocn" renders the real logo.

logo
React.ReactNode—

Replaces the logo / name at the top.

reelLength
number24

Frames for the new price's reels to spin and land.

turns
number13

Digits each reel of the new price spins through before landing.

accent
string"#3B5BFD"

Accent color of the sweep.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Hanken Grotesk"

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 multiplier.

theme
"dark" | "light""dark"

Light or dark palette.

  • pricestring

    The new price, set huge. Digits roll in on reels.

    Default"$0"

  • wasstring

    The old price, shown first, struck through, then set aside.

    Default"$29"

  • leadstring

    Serif italic lead-in before the prices.

    Default"From"

  • notestring

    Small line under the price.

    Default"per seat · billed yearly"

  • availabilitystring

    Availability line at the foot of the slate.

    Default"Available today"

  • productstring

    Product name after the logo at the top; empty hides it.

    Default"Pro"

  • namestring

    Brand at the top; "remocn" renders the real logo.

    Default"remocn"

  • logoReact.ReactNode

    Replaces the logo / name at the top.

  • reelLengthnumber

    Frames for the new price's reels to spin and land.

    Default24

  • turnsnumber

    Digits each reel of the new price spins through before landing.

    Default13

  • accentstring

    Accent color of the sweep.

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background fill; pass "transparent" to drop it.

  • fontFamilystring

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

    Default"Hanken Grotesk"

  • 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 multiplier.

    Default1

  • theme"dark" | "light"

    Light or dark palette.

    Default"dark"