Text Highlight

Use Text Highlight to emphasize a short piece of inline content with a restrained marker, underline, or block reveal.

Preview

Reduce motion:Off
Tune:Off
Inspect

Details should feel obvious.

Installation

Usage

Props

PropertyTypeDefaultDescription
childrenReactNoderequiredThe text or inline content to emphasize.
variantTextHighlightVariant"marker"The visual treatment used for the highlight.
triggerTextHighlightTrigger"in-view"Controls when the highlight animation starts.
colorstring"#facc15"The highlight color. Accepts any CSS color value.
durationnumber520The animation duration in milliseconds.
delaynumber0The animation delay in milliseconds.
oncebooleantrueWhether an in-view highlight should play only once.

Accessibility

The effect is decorative and does not change the text semantics. Reduced-motion users receive the completed highlight immediately.

Was this page helpful?

Your response helps us improve component docs.