Text Highlight

A hand-placed highlighter band that sweeps in behind your text and tracks wrapping.

texthighlightmarkerannotationsvgtypographyheadline
Text Highlight component preview

Props

PropTypeDefaultDescription
childrenReact.ReactNode-The inline content to highlight.
colorstringchili (brand)Marker color. Defaults to the Wensity brand (chili).
opacitynumber0.4Opacity of the marker band.
durationnumber0.9Seconds for the sweep.
delaynumber0Seconds to wait before sweeping.
trigger"view" | "hover" | "mount""view"When to draw. View draws once on-screen; hover draws and retracts.
paddingnumber2Extra px around the text before the band is drawn.
drawnboolean-Force the draw state. When omitted the trigger drives it; reduced motion always draws instantly.
askeyof JSX.IntrinsicElements"span"Outer element tag.