Velora UI

Text Highlighter

Marker-pen sweep that draws in when the phrase scrolls into view.

  • 0.8 KB gzipped
  • Deps: motion/react
  • Reduced-motion safe
  • Base UI & Radix compatible
Open in v0

Preview

Every component ships its own receipts.

Installation

pnpm dlx shadcn@latest add https://velora.colorlib.com/r/text-highlighter.json

Adds components/velora/text-highlighter.tsx, installs motion and merges the keyframes and tokens into your CSS.

Props

PropTypeDefault
children*React.ReactNode—
color

Any CSS colour; defaults to a translucent brand wash

string"color-mix(in oklch, var(--brand) 30%, transparent)"
duration

Seconds for the sweep

number0.7
classNamestring—

Accessibility

Reduced motion
The marker wash appears instantly at full width once the phrase scrolls into view, with no sweep.
Keyboard
Decorative — nothing to operate.
Screen readers
The text is read normally; the highlight bar is aria-hidden and the emphasis is visual only (no <mark> or <strong> semantics).