Pinned Word

A serif italic word stays pinned in a sentence while the words around it change. A free, MIT-licensed Remotion text animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/pinned-word

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { PinnedWord } from "@/components/remocn/pinned-word";
 
const PinnedWordScene = () => (
  <PinnedWord lines={["Ship a video tonight.", "Own every video frame."]} word="video" hold={36} />
);
 
export const RemotionRoot = () => (
  <Composition
    id="PinnedWord"
    component={PinnedWordScene}
    durationInFrames={260}
    fps={60}
    width={1280}
    height={720}
  />
);

The word stays fixed in italic serif while the lines around it swap in turn. Pass lines that each contain word and set hold for pacing. It ships in light and dark through the theme prop.

Props14

PropTypeDefault
lines
string[]—

Sentences in order, each containing the pinned word.

word
string"video"

Word kept fixed in italic serif.

hold
number36

Frames each state stays on screen before the next one.

flick
number18

Frames each flick to the next line takes.

accent
string"#3B5BFD"

Accent color override; falls back to the theme accent.

ink
string—

Text color; overrides the theme ink.

background
string—

Background color override; falls back to the theme background.

fontFamily
string"Schibsted Grotesk"

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

accentFont
string"Instrument Serif"

Italic typeface for the pinned word. Load the font 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"

Ships light and dark; picks the palette.

  • linesstring[]

    Sentences in order, each containing the pinned word.

  • wordstring

    Word kept fixed in italic serif.

    Default"video"

  • holdnumber

    Frames each state stays on screen before the next one.

    Default36

  • flicknumber

    Frames each flick to the next line takes.

    Default18

  • accentstring

    Accent color override; falls back to the theme accent.

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background color override; falls back to the theme background.

  • fontFamilystring

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

    Default"Schibsted Grotesk"

  • accentFontstring

    Italic typeface for the pinned word. Load the font in your project first.

    Default"Instrument Serif"

  • 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

  • grainboolean

    Film grain over the scene.

    Defaulttrue

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1

  • theme"dark" | "light"

    Ships light and dark; picks the palette.

    Default"dark"