RemotionUI
Primitives

Word Highlight

Spring-animated highlighter wipe on a word in a sentence.

Primitiveatoms

Install
npx remotion-ui@latest add word-highlight

Finds highlightWord in text and wipes a highlight behind it using spring() — the pattern from Remotion's text-animation guidance. Uses springSmooth from springs.ts.

Live preview

AI usage

Install first, then import the copied source component locally.

AI guide

Install

npx remotion-ui@latest add word-highlight

Import after install

@/remotion/primitives/word-highlight
  • Use when: frame-level motion primitives and reusable animation wrappers.
  • Customize: text, highlightWord, durationInFrames, highlightColor, plus copied source for timing, layout, colors, and typography.
  • Rule: do not import this component from the remotion-ui npm package; it is copied into your project.

Usage

import { WordHighlight } from "@/remotion/primitives/word-highlight";

<WordHighlight
  text="Ship faster with RemotionUI"
  highlightWord="RemotionUI"
  highlightColor="#f97316"
/>

API Reference

PropTypeDescription
text*stringFull sentence to render.
highlightWord*stringSubstring to highlight with an animated wipe.
durationInFramesnumberHighlight wipe duration.
highlightColorstringBackground color behind the highlighted word.
fontSizenumberText size in pixels.

Related