Split Text Chars
Split a string into characters, words, or lines and stagger them in. Install with npx remotion-ui@latest add split-text-chars.
PrimitivePrimitives
$ npx remotion-ui@latest add split-text-charsSplits a string into characters, words, or lines and staggers each unit in.
The default look is deliberately plain. This is the foundation the other text
effects are built on: it owns the split, the layout, and the stagger, and hands
each unit's own 0–1 progress to renderUnit so an effect only has to describe
one glyph.
Modes
mode decides what one animated unit is — chars, words, or lines. The
layout is always three levels (line → word → unit) whichever mode is used, so a
character split can never break a word across a line.
mode="words" is a word-by-word reveal; there is no separate component for it.
Ordering
order re-ranks which unit animates first without touching document order:
start, end, center (middle outward), edges (ends inward), or random.
random is seeded, so the same seed renders the same shuffle on every machine
and every frame.
Building an effect on it
Effects that draw something other than plain text should skip the component and call the hook, which gives identical splitting and stagger semantics:
import { useSplitText } from "@/remotion/lib/text-split";
const { lines, lastEnterFrame } = useSplitText({
text,
mode: "chars",
order: "center",
});lastEnterFrame is the frame the final unit lands on — size a <Sequence> with
it rather than guessing.
The splitting foundation. Other text effects should call `useSplitText()` from `text-split` rather than re-implementing a split.
Agent notes
Install first, then import the copied source component locally. AI guide →
@/remotion/primitives/split-text-chars- Use when: frame-level motion primitives and reusable animation wrappers.
- Customize: text, mode, order, effect, plus copied source for timing, layout, colors, and typography.
- Rule: do not import this component from the
remotion-uinpm package; it is copied into your project.
Usage
import { SplitTextChars } from "@/remotion/primitives/split-text-chars";
<SplitTextChars text="Ship it on Friday" mode="chars" order="center" />
// Headless: build your own effect on the same split and stagger.
import { useSplitText } from "@/remotion/lib/text-split";
const { lines } = useSplitText({ text, mode: "words" });API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| text* | string | - | Copy to split. `\n` starts a new line. |
| mode | "chars" | "words" | "lines" | "chars" | What one animated unit is. `words` is a word-by-word reveal. |
| order | "start" | "end" | "center" | "edges" | "random" | "start" | Which unit animates first. Document order is never changed. |
| effect | "fade-up" | "fade" | "scale" | "blur" | "none" | "fade-up" | Built-in look. `none` positions the units and animates nothing. |
| renderUnit | (unit: SplitUnitState) => ReactNode | - | Draws one unit from its own 0-1 progress. This is the composition point for custom text effects. |
| staggerInFrames | number | 2 chars / 4 words / 7 lines | Frames between consecutive units. |
| durationInFrames | number | 20 chars / 24 words / 28 lines | Length of one unit's entrance. |
| delayInFrames | number | 0 | Frames before the first unit starts. |
| spring | boolean | 'smooth' | 'snappy' | 'bouncy' | Partial<SpringConfig> | - | Drive the entrance with a spring instead of the ease-out curve. |
| exit | boolean | false | Animate back out, landing inside the surrounding Sequence. |
| exitStaggerInFrames | number | = staggerInFrames | Frames between consecutive units leaving. |
| travel | number | 0.42 | `fade-up` travel distance in em. |
| fontSize | number | 84 (scaled) | Font size in pixels. |
| frame | number | - | Frame override — pass the parent frame inside a Sequence. |