Skip to content

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

3.2 KB
Raw Blame
---
title: Ridgeline
description: "Stacked ridgeline distributions per year, the latest one lit in gradient with a 2.6x stat"
component: ridgeline
vibe: data
length: 122
useWhen:
  - "A before-and-after story across several periods, where the latest distribution should stand out."
  - "A productivity claim, such as 2.6x more videos per team, backed by shifting distributions."
  - "A beat that wants a moody, layered chart instead of plain bars."
avoidWhen:
  - "You have only two groups to compare — use `beeswarm`."
  - "You want flowing layers that change over time — use `streamgraph`."
  - "You need one before-and-after curve — use `distribution-shift`."
askedAs:
  - "joyplot distributions"
  - "stacked mountain chart over years"
  - "I want stacked distribution curves per year with the latest lit up"
  - "before and after across several periods, newest in gradient"
  - "show a shift in distribution with a 2.6x callout"
  - "viewer sees old years faded and the newest ridge standing out"
---

<ComponentPreview name="ridgeline" />

<InstallBlock name="ridgeline" />

## Usage

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

const RidgelineScene = () => (
  <Ridgeline
    labels={["2022", "2023", "2024", "2025"]}
    highlightLabel="With remocn"
    value="2.6×"
    caption="more videos per team"
  />
);

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

Grey ridgelines for each period draw in one after another, then a lit gradient ridge rises to the right and shifts the peak while the multiplier stat and caption land. Pass `labels` for the period rows, `highlightLabel` for the lit row, and `value`, `caption`, `axisLabel` and `ticks` for the text. Ships dark and light via `theme`.

<PropsTable title="Props"
  rows={[
    {
      name: "labels",
      type: "string[]",
      default: "DEFAULT_LABELS",
      description: "Row labels for the grey ridgelines, oldest first.",
    },
    {
      name: "highlightLabel",
      type: "string",
      default: "\"With remocn\"",
      description: "Label on the lit gradient ridge.",
    },
    {
      name: "value",
      type: "string",
      default: "\"2.6×\"",
      description: "The hero stat that lands, such as 2.6x.",
    },
    {
      name: "caption",
      type: "string",
      default: "\"more videos per team\"",
      description: "Line under the hero stat.",
    },
    {
      name: "axisLabel",
      type: "string",
      default: "\"videos per team, per month\"",
      description: "Caption under the x axis.",
    },
    {
      name: "ticks",
      type: "string[]",
      default: "DEFAULT_TICKS",
      description: "Tick labels along the x axis.",
    },
    {
      name: "accent",
      type: "string",
      default: "\"#3B5BFD\"",
      description: "Accent color for the hero element.",
    },
    {
      name: "speed",
      type: "number",
      default: "1",
      description: "Playback multiplier.",
    },
    {
      name: "theme",
      type: "\"dark\" | \"light\"",
      default: "\"dark\"",
      description: "Dark or light palette.",
    },
  ]}
/>