Anagram Shuffle
The letters of one word slide into new positions to spell its anagram. A free, MIT-licensed Remotion text animation.
$ pnpm dlx shadcn@latest add @remocn/anagram-shuffleUsage
// src/Root.tsx
import { Composition } from "remotion";
import { AnagramShuffle } from "@/components/remocn/anagram-shuffle";
const AnagramShuffleScene = () => (
<AnagramShuffle from="listen" to="silent" accent="#3B5BFD" />
);
export const RemotionRoot = () => (
<Composition
id="AnagramShuffle"
component={AnagramShuffleScene}
durationInFrames={300}
fps={60}
width={1280}
height={720}
/>
);The from word shows, then each letter glides to its place in the to word. Both words must use the same letters, so pass a matching from and to pair. It ships in light and dark through the theme prop.
Props12
| Prop | Type | Default |
|---|---|---|
| from | string"listen" Starting word. | |
| to | string"silent" Anagram of `from` that letters move into. | |
| accent | string"#3B5BFD" Accent color override; falls back to the theme accent. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| stagger | number3 Frames between letters as they leave for their new places. | |
| travel | number30 Frames each letter takes to travel to its new place. | |
| grain | booleantrue Film grain over the scene. | |
| 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. | |
| theme | "dark" | "light""dark" Ships light and dark; picks the palette. | |
| speed | number1 Playback speed multiplier for the whole timeline. | |
- fromstring
Starting word.
Default
"listen" - tostring
Anagram of `from` that letters move into.
Default
"silent" - accentstring
Accent color override; falls back to the theme accent.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Background fill; pass "transparent" to drop it.
- staggernumber
Frames between letters as they leave for their new places.
Default
3 - travelnumber
Frames each letter takes to travel to its new place.
Default
30 - grainboolean
Film grain over the scene.
Default
true - 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 - theme"dark" | "light"
Ships light and dark; picks the palette.
Default
"dark" - speednumber
Playback speed multiplier for the whole timeline.
Default
1