Stacked Shift
A stacked share bar shifts over the years until the logo series reaches 52%. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/stacked-shiftUsage
// src/Root.tsx
import { Composition } from "remotion";
import { StackedShift } from "@/components/remocn/stacked-shift";
const StackedShiftScene = () => (
<StackedShift
years={["2023", "2024", "2025"]}
caption="of launch videos"
series={[
{ label: "remocn", values: [6, 24, 52] },
{ label: "Kitebase", values: [34, 28, 18] },
{ label: "Other", values: [60, 48, 30] },
]}
/>
);
export const RemotionRoot = () => (
<Composition
id="StackedShift"
component={StackedShiftScene}
durationInFrames={178}
fps={30}
width={1280}
height={720}
/>
);One stacked share bar shifts from year to year, the segments sliding to new sizes with the year label changing, until the highlighted series reaches its final share and its caption lands. Pass series (label and one value per year), years, highlight and caption. Ships dark and light via theme.
Props15
| Prop | Type | Default |
|---|---|---|
| series | StackedSeries[]DEFAULT_SERIES Series stacked in the bar, each with one value per year. | |
| years | string[]DEFAULT_YEARS Year labels, one per value in each series. | |
| highlight | number0 Index of the series that gets the gradient. | |
| caption | string"of launch videos" Line under the final share. | |
| hold | number54 Frames from one year's shift to the next. | |
| accent | string"#3B5BFD" Accent color for the hero element. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| fontFamily | string"Figtree" Typeface for the copy. Load the font in your project first. | |
| logo | React.ReactNode— Replaces the remocn mark. | |
| 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. | |
| grain | booleantrue Film grain over the scene. | |
| theme | "dark" | "light""dark" Dark or light palette. | |
| speed | number1 Playback multiplier. | |
- seriesStackedSeries[]
Series stacked in the bar, each with one value per year.
Default
DEFAULT_SERIES - yearsstring[]
Year labels, one per value in each series.
Default
DEFAULT_YEARS - highlightnumber
Index of the series that gets the gradient.
Default
0 - captionstring
Line under the final share.
Default
"of launch videos" - holdnumber
Frames from one year's shift to the next.
Default
54 - accentstring
Accent color for the hero element.
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
"Figtree" - logoReact.ReactNode
Replaces the remocn mark.
- scalenumber
Size of the foreground around the frame's center; the background stays put.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - grainboolean
Film grain over the scene.
Default
true - theme"dark" | "light"
Dark or light palette.
Default
"dark" - speednumber
Playback multiplier.
Default
1