Dot Sort
Dots sort into rows by group, the logo row largest at 41%. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/dot-sortUsage
// src/Root.tsx
import { Composition } from "remotion";
import { DotSort } from "@/components/remocn/dot-sort";
const DotSortScene = () => (
<DotSort
highlight={0}
groups={[
{ label: "remocn", value: 41 },
{ label: "Kitebase", value: 23 },
{ label: "Lumen", value: 17 },
{ label: "Other", value: 19 },
]}
/>
);
export const RemotionRoot = () => (
<Composition
id="DotSort"
component={DotSortScene}
durationInFrames={300}
fps={60}
width={1280}
height={720}
/>
);Four hundred dots start in a cloud, then sort into rows by group; the highlighted row gets the gradient, the rest dim, and its percentage and caption land. Pass groups (label and value) and highlight, the index of the hero group. Ships dark and light via theme.
Props15
| Prop | Type | Default |
|---|---|---|
| groups | DotSortGroup[]DEFAULT_GROUPS Groups the dots sort into, each with a label and value. | |
| highlight | number0 Index of the hero group. | |
| caption | string— Line under the percentage; defaults to a choose line. | |
| verb | string"choose" Word before the hero group's name in the default caption. | |
| logo | React.ReactNode— Replaces the remocn mark. | |
| 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"Instrument Sans" Typeface for the copy. Load the font in your project first. | |
| fly | number28 Frames each dot takes to fly into its row. | |
| 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. | |
- groupsDotSortGroup[]
Groups the dots sort into, each with a label and value.
Default
DEFAULT_GROUPS - highlightnumber
Index of the hero group.
Default
0 - captionstring
Line under the percentage; defaults to a choose line.
- verbstring
Word before the hero group's name in the default caption.
Default
"choose" - logoReact.ReactNode
Replaces the remocn mark.
- 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
"Instrument Sans" - flynumber
Frames each dot takes to fly into its row.
Default
28 - 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