Indent Steps
Code-editor style text animation for Remotion: up to five lines rise in, each indented one step further right like code, then one word lights up in a gradient.
In Remotion, Indent Steps makes up to five lines rise in, each indented one step further right like code in an editor, and then one word lights up in a gradient. Use it for a write, render, ship sequence or a short developer-facing tagline.
$ pnpm dlx shadcn@latest add @remocn/indent-stepsHow to build this in Remotion
You don't need a Sequence per line or a staggered spring() for this. Install the component and pass your lines:
npx shadcn@latest add @remocn/indent-stepsOne scene reads every line's start frame from timeline.ts; each line rises from a mask and tabs right with interpolate() over Easing curves, and the highlight word fills with a gradient after the last line lands.
Good to know
- Length: 80 frames of motion at 30 fps (160 at 60 fps) with the default props; the demo plays 120 frames, which adds a hold. With the default
staggerof 20, long lists tighten the gap so every line lands inside the composition. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, 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 Hanken Grotesk for the lines and Geist Mono for the line-number gutter itself, through
@remotion/google-fonts. PassfontFamilyto use your own face for the lines, and load that font in your project. highlightis matched case-insensitively inside the lines; the accent (#3B5BFDby default) colors the guide line that flashes after each tab.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { IndentSteps } from "@/components/remocn/indent-steps";
const IndentStepsScene = () => (
<IndentSteps
lines={["Fork the scene.", "Change the props.", "Render tonight."]}
highlight="tonight"
/>
);
export const RemotionRoot = () => (
<Composition
id="IndentSteps"
component={IndentStepsScene}
durationInFrames={240}
fps={60}
width={1280}
height={720}
/>
);Each line rises from a mask and tabs one step further right with a small snap and a guide line, with optional line numbers in the gutter. Once the last line lands, the highlight word fills with a gradient. Pass up to five lines; set exit to outdent and slide them out over the last 18 frames. It ships light and dark.
Props14
| Prop | Type | Default |
|---|---|---|
| lines | string[]— Up to five lines, each indented one step more than the last. | |
| highlight | string"tonight" Word or phrase that turns to a gradient at the end; case-insensitive. | |
| lineNumbers | booleantrue Show a mono line-number gutter beside the lines. | |
| exit | booleanfalse Outdent and slide the lines out during the final 18 frames. | |
| stagger | number20 Frames between lines; long lists tighten it so every line lands. | |
| accent | string"#3B5BFD" Color of the guide line that flashes after each tab. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| fontFamily | string"Hanken Grotesk" Typeface for the lines. Hanken Grotesk loads itself; load any other face in your project first. | |
| 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. | |
| speed | number1 Playback speed multiplier for the whole timeline. | |
| theme | "dark" | "light""dark" Light or dark palette. | |
- linesstring[]
Up to five lines, each indented one step more than the last.
- highlightstring
Word or phrase that turns to a gradient at the end; case-insensitive.
Default
"tonight" - lineNumbersboolean
Show a mono line-number gutter beside the lines.
Default
true - exitboolean
Outdent and slide the lines out during the final 18 frames.
Default
false - staggernumber
Frames between lines; long lists tighten it so every line lands.
Default
20 - accentstring
Color of the guide line that flashes after each tab.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Background fill; pass "transparent" to drop it.
- fontFamilystring
Typeface for the lines. Hanken Grotesk loads itself; load any other face in your project first.
Default
"Hanken Grotesk" - 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 - speednumber
Playback speed multiplier for the whole timeline.
Default
1 - theme"dark" | "light"
Light or dark palette.
Default
"dark"
Common questions
How do I make lines rise in Remotion, each indented further right like code?
Install Indent Steps with npx shadcn@latest add @remocn/indent-steps, pass up to five lines and the highlight word that lights up at the end.
Can the lines leave at the end?
Yes. Set exit and the lines outdent and slide out over the final 18 frames.
Related effects
- Typewriter: lines typed character by character.
- Uncomment Line: code comment lines lose their // and light up.
- Index List: a numbered feature list with a moving highlight row.
- Three Steps: a how-it-works scene with three numbered steps.