Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

3.5 KB
Raw Blame
---
title: Price Slate
description: "An old price is struck through and set aside while the new price spins in on digit reels."
component: price-slate
vibe: premium
length: 99
useWhen:
  - "A pricing reveal where the new price should land with a spin and a gradient sweep."
  - "A launch-day offer that needs the old price visible, struck through, before the new one lands."
  - "A closing slate with a product line at the top and an availability line at the foot."
avoidWhen:
  - "Dozens of fine-print lines should disappear to leave the price - use `price-page`."
  - "The beat is a market listing with a ticker - use `ipo-open`."
  - "The price is a receipt-style total - use `the-tab`."
askedAs:
  - "old price crossed out"
  - "new price digit reels"
  - "I want the old price struck through and a new one spinning in"
  - "price drop reveal with slot machine digits"
  - "launch day offer where the lower price lands with a shine"
  - "viewer sees the discount hit with a satisfying spin"
---

<ComponentPreview name="price-slate" />

<InstallBlock name="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`.

<PropsTable title="Props"
  rows={[
    {
      name: "price",
      type: "string",
      default: "\"$0\"",
      description: "The new price, set huge. Digits roll in on reels.",
    },
    {
      name: "was",
      type: "string",
      default: "\"$29\"",
      description: "The old price, shown first, struck through, then set aside.",
    },
    {
      name: "lead",
      type: "string",
      default: "\"From\"",
      description: "Serif italic lead-in before the prices.",
    },
    {
      name: "note",
      type: "string",
      default: "\"per seat · billed yearly\"",
      description: "Small line under the price.",
    },
    {
      name: "availability",
      type: "string",
      default: "\"Available today\"",
      description: "Availability line at the foot of the slate.",
    },
    {
      name: "product",
      type: "string",
      default: "\"Pro\"",
      description: "Product name after the logo at the top; empty hides it.",
    },
    {
      name: "name",
      type: "string",
      default: "\"remocn\"",
      description: "Brand at the top; \"remocn\" renders the real logo.",
    },
    {
      name: "logo",
      type: "React.ReactNode",
      description: "Replaces the logo / name at the top.",
    },
    {
      name: "accent",
      type: "string",
      default: "\"#3B5BFD\"",
      description: "Accent color of the sweep.",
    },
    {
      name: "speed",
      type: "number",
      default: "1",
      description: "Playback multiplier.",
    },
    {
      name: "theme",
      type: "\"dark\" | \"light\"",
      default: "\"dark\"",
      description: "Light or dark palette.",
    },
  ]}
/>