Typo Fix
A misspelled word is caught and corrected in place inside a short line. A free, MIT-licensed Remotion text animation.
In Remotion, Typo Fix shows a misspelled word in a short sentence being noticed and corrected in place. Use it for a quick copy-edit demo that shows how easy a fix is.
$ pnpm dlx shadcn@latest add @remocn/typo-fixGood to know
- Length: 80 frames of motion at 30 fps (160 at 60 fps) with the default props. That is the minimum for its
Sequence; add your own hold on top. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion (durationInFrames,Sequencelengths) are doubled. The component's own props counted in frames stay in 30 fps frames at any frame rate, see Frame rate. - Installs:
remotion,@remotion/google-fontsfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: loads Onest itself through
@remotion/google-fonts. PassfontFamilyto use your own face, and load that font in your project.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { TypoFix } from "@/components/remocn/typo-fix";
const TypoFixScene = () => (
<TypoFix wrong="Lanuch" correct="Launch" after="day" />
);
export const RemotionRoot = () => (
<Composition
id="TypoFix"
component={TypoFixScene}
durationInFrames={232}
fps={60}
width={1280}
height={720}
/>
);The wrong word appears in a short line, gets flagged, and is corrected to correct in place. Pass wrong, correct and surrounding before and after text. It ships in light and dark through the theme prop.
Props15
| Prop | Type | Default |
|---|---|---|
| wrong | string"Lanuch" Misspelled word shown first. | |
| correct | string"Launch" Correct spelling it becomes. | |
| before | string"" Text before the word. | |
| after | string"day" Text after the word. | |
| fixAt | number44 Frame the letters start hopping into their right places. | |
| accent | string"#3B5BFD" Accent color override; falls back to the theme accent. | |
| errorColor | string— Color of the spell-check squiggle; overrides the theme. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill in place of the lit ground; pass "transparent" to drop it. | |
| fontFamily | string"Onest" Typeface for the copy. Load the font in your project first. | |
| 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. | |
- wrongstring
Misspelled word shown first.
Default
"Lanuch" - correctstring
Correct spelling it becomes.
Default
"Launch" - beforestring
Text before the word.
Default
"" - afterstring
Text after the word.
Default
"day" - fixAtnumber
Frame the letters start hopping into their right places.
Default
44 - accentstring
Accent color override; falls back to the theme accent.
Default
"#3B5BFD" - errorColorstring
Color of the spell-check squiggle; overrides the theme.
- inkstring
Text color; overrides the theme ink.
- backgroundstring
Background fill in place of the lit ground; pass "transparent" to drop it.
- fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Onest" - 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