RemotionUI

Marker Highlight

Highlighter stroke swept word by word, with marker, knockout, underline and box variants.

PrimitivePrimitives

marker-highlight30fps · 960×540
Install
$ npx remotion-ui@latest add marker-highlight

Strikes emphasis across phrase, one word at a time. Word by word matters: one band appearing behind the whole phrase reads as a background, while a stroke crossing each word in turn reads as a hand moving.

The ink flips under the leading edge of the stroke rather than at a threshold, so covered text is never briefly unreadable. variant switches between a translucent marker, a solid knockout, an underline and a box.

The stroke crosses each marked word in turn, so it reads as a hand moving rather than a background appearing.

Agent notes

Install first, then import the copied source component locally. AI guide →

Import
@/remotion/primitives/marker-highlight
  • Use when: frame-level motion primitives and reusable animation wrappers.
  • Customize: text, phrase, highlightWord, variant, 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

Example
import { MarkerHighlight } from "@/remotion/primitives/marker-highlight"; <MarkerHighlight text="The best motion is code you can read and change." phrase="code you can read and change" markerColor="#f97316" />

API Reference

PropTypeDescription
text*stringFull sentence to render.
phrasestringPhrase to sweep. Matched case-insensitively and may span several words.
highlightWordstringSingle-word form of phrase.
variant"marker" | "knockout" | "underline" | "box"How the emphasis is drawn.
durationInFramesnumberLength of the sweep across one word.
delayInFramesnumberFrames before the first word is struck.
staggerInFramesnumberFrames between one word being struck and the next.
tiltnumberTilt of the stroke in degrees — a hand does not draw level.
markerColorstringColour of the stroke.
invertOnHighlightbooleanFlip the ink under the leading edge of the stroke as it passes.
inkColorstringInk used over a covered word.
colorstringBase text colour.
textAlign"left" | "center" | "right"Alignment of the wrapped words.
fontSizenumberText size in pixels.
fontWeightnumberText weight.
fontFamilystringFont family for the text.
styleCSSPropertiesStyles merged onto the wrapper.

Related