Story Text

Story-style text types in word by word on rounded gradient highlight bubbles that change style. A free, MIT-licensed Remotion social video animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/story-text

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { StoryText } from "@/components/remocn/story-text";
 
const StoryTextScene = () => (
  <StoryText text="okay, it's live — the update you kept asking for is finally here" />
);
 
export const RemotionRoot = () => (
  <Composition
    id="StoryText"
    component={StoryTextScene}
    durationInFrames={330}
    fps={60}
    width={1280}
    height={720}
  />
);

Words pop in one at a time with a caret, each sitting on a merged rounded highlight bubble that wraps across lines. After the last word the highlight cycles through outline, plain and filled again. Pass your sentence as text; measure sets the line width as a fraction of the frame. Ships dark and light via theme.

The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.

Props14

PropTypeDefault
text
string"okay, it’s live — the update you kept asking for is finally here"

The sentence to type. Wraps onto lines inside the measure.

measure
number—

Line width as a fraction of the frame, before wrapping.

stagger
number5

Frames between words as they type in.

hold
number14

Frames the typed text holds before the sticker styles cycle.

accent
string"#3B5BFD"

Color of the caret.

ink
string—

Text and sticker color; overrides the theme ink.

background
string—

Solid fill in place of the gradient ground; pass "transparent" to drop it.

fontFamily
string"Figtree"

Typeface for the copy. Load the font in your project first.

theme
"dark" | "light""dark"

Color scheme. Ships dark and light.

ground
GshPresetId—

gradients.sh preset id for the animated ground.

groundParams
Partial<GradientParams>—

Overrides for the ground shader parameters.

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.

speed
number1

Playback speed multiplier for the whole timeline.

  • textstring

    The sentence to type. Wraps onto lines inside the measure.

    Default"okay, it’s live — the update you kept asking for is finally here"

  • measurenumber

    Line width as a fraction of the frame, before wrapping.

  • staggernumber

    Frames between words as they type in.

    Default5

  • holdnumber

    Frames the typed text holds before the sticker styles cycle.

    Default14

  • accentstring

    Color of the caret.

    Default"#3B5BFD"

  • inkstring

    Text and sticker color; overrides the theme ink.

  • backgroundstring

    Solid fill in place of the gradient ground; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy. Load the font in your project first.

    Default"Figtree"

  • theme"dark" | "light"

    Color scheme. Ships dark and light.

    Default"dark"

  • groundGshPresetId

    gradients.sh preset id for the animated ground.

  • groundParamsPartial<GradientParams>

    Overrides for the ground shader parameters.

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1