This component no longer exists. It was in remotionui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-11 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
stagger-children
remotionui/stagger-childrenRemovedComponent
Offset children onto their own sequences, in forward, reverse, centre or edge order, in and out
Live preview
live · rendered by the registry
Rendered by remotionui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://remotionui.com/r/stagger-children.jsonSource
1import {2 Children,3 cloneElement,4 isValidElement,5 type ReactElement,6 type ReactNode,7} from "react";8import { Sequence, useVideoConfig } from "remotion";9import {10 defaultExitFrames,11 DEFAULT_ENTER_FRAMES,12 type EnterExitOptions,13} from "@/remotion/lib/motion-primitive";14import { staggerDelay } from "@/remotion/lib/timing";1516export type StaggerOrder = "forward" | "reverse" | "center" | "edges";1718export type StaggerChildrenProps = {19 children: ReactNode;20 /** Frames between one child starting and the next. */21 staggerInFrames?: number;22 /** Frames before the first child starts. */23 baseDelayInFrames?: number;24 /**25 * Which child goes first. `center` runs outwards from the middle, `edges`26 * runs inwards — both read as one gesture across a row rather than a queue.27 */28 order?: StaggerOrder;29 /**30 * Frames between one child leaving and the next, in the order they arrived.31 * Only affects children that animate out; 0 lands the group together.32 */33 exitStaggerInFrames?: number;34};3536/** Position in the run order, 0 = first to start. */37function rankOf(index: number, count: number, order: StaggerOrder): number {38 const mid = (count - 1) / 2;3940 switch (order) {41 case "reverse":42 return count - 1 - index;43 case "center":44 return Math.round(Math.abs(index - mid));45 case "edges":46 return Math.round(mid - Math.abs(index - mid));47 default:48 return index;49 }50}5152/** Host elements would render an unknown attribute; only components take props. */53function acceptsMotionProps(child: ReactElement): boolean {54 return typeof child.type !== "string";55}5657/**58 * Offsets each child onto its own slot with `<Sequence layout="none">`, so59 * every child animates from its local frame 0 and needs no delay of its own.60 *61 * Inside a bounded window each slot is given an end as well, which is what62 * lets children with `exit` land out on time. `exitStaggerInFrames` moves each63 * child's exit earlier instead of shortening its slot — cutting slots short64 * would unmount children one by one and collapse the layout under them.65 *66 * @see skills/remotion/remotion-markup/sequencing.md67 */68export const StaggerChildren: React.FC<StaggerChildrenProps> = ({69 children,70 staggerInFrames = 8,71 baseDelayInFrames = 0,72 order = "forward",73 exitStaggerInFrames = 0,74}) => {75 const { durationInFrames: windowFrames } = useVideoConfig();76 const items = Children.toArray(children);77 const bounded = Number.isFinite(windowFrames);7879// … truncated
