Skip to content

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

3.6 KB
Raw Blame
---
title: Diminuendo
description: "Huge counter climbs to 860,000 while each trailing digit group fades quieter than the last"
component: diminuendo
vibe: data
length: 78
useWhen:
  - "A huge-number beat where the figure grows as it climbs and each trailing digit group is drawn smaller and quieter than the last."
  - "A scale statement such as 860,000 frames rendered that wants to feel like a musical decrescendo of digits."
  - "A bold single-figure scene with a short caption at the top and an accent-tinted stage."
avoidWhen:
  - "You want a plain, evenly weighted figure — use `compact-stat`."
  - "You want a thin-to-heavy weight change on digits that are still changing — use `churn-count`."
  - "You want the number to slam in with impact — use `smash-count`."
askedAs:
  - "number fading digits"
  - "big number with quieter trailing groups"
  - "I want a huge counter where each trailing digit group is smaller and fainter"
  - "giant figure that grows as it climbs, 860,000"
  - "elegant number reveal with fading tail"
  - "descending digit opacity"
---

<ComponentPreview name="diminuendo" />

<InstallBlock name="diminuendo" />

## Usage

```tsx
// src/Root.tsx
import { Composition } from "remotion";
import { Diminuendo } from "@/components/remocn/diminuendo";

const DiminuendoScene = () => <Diminuendo value={860000} label="frames rendered from the registry last month" ratio={0.8} />;

export const RemotionRoot = () => (
  <Composition
    id="Diminuendo"
    component={DiminuendoScene}
    durationInFrames={120}
    fps={30}
    width={1280}
    height={720}
  />
);
```

A big figure counts from `from` to `value` on a log-like curve, adding new leading digits as it passes each power of ten. Each digit group to the right is drawn smaller and fainter by `ratio`, and digits roll as they change. A caption fades in at the top left. Pass `value`, `label`, `ratio` and optionally `prefix`, `suffix` and `separator`. It ships light and dark through the `theme` prop.

<PropsTable title="Props"
  rows={[
    {
      name: "value",
      type: "number",
      default: "860000",
      description: "The final number the count lands on.",
    },
    {
      name: "from",
      type: "number",
      default: "0",
      description: "The number the count starts from.",
    },
    {
      name: "prefix",
      type: "string",
      default: "\"\"",
      description: "Text placed before the number, such as a currency sign.",
    },
    {
      name: "suffix",
      type: "string",
      default: "\"\"",
      description: "Text placed after the number, such as a unit.",
    },
    {
      name: "label",
      type: "string",
      default: "\"frames rendered from the registry last month\"",
      description: "Caption at the top left.",
    },
    {
      name: "ratio",
      type: "number",
      default: "0.8",
      description: "Size of each lower digit relative to the one before it, 0.5 to 0.95.",
    },
    {
      name: "separator",
      type: "string",
      default: "\",\"",
      description: "Thousands separator character. Pass an empty string for none.",
    },
    {
      name: "accent",
      type: "string",
      default: "\"#8ACE00\"",
      description: "Base colour of the digit ramp and the tint of the stage.",
    },
    {
      name: "background",
      type: "string",
      description: "Stage colour; pass 'transparent' to layer over other footage.",
    },
    {
      name: "speed",
      type: "number",
      default: "1",
      description: "Playback speed multiplier; 1 is the designed pace.",
    },
    {
      name: "theme",
      type: "\"dark\" | \"light\"",
      default: "\"dark\"",
      description: "Ships light and dark.",
    },
  ]}
/>