Highlight

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-highlight

About this component

A note field on a ruled index card held by a strip of tape. Each word you finish gets a highlighter stroke swept behind it, yellow, pink, green and blue in turn, each at its own slight angle.

Triggers

  • Focus
  • Fill
  • State change

Techniques

  • Pseudo elements
  • CSS transition
  • CSS variables

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native text input named by aria-label ("Note"); the tape, strokes, mirror and caret are aria-hidden. Focus straightens the card and draws a yellow ring.

Reduced motion

Strokes appear at once and the caret stays solid.

Use it in anything you build, commercial and client work included. Licence

More inputs

See all
HoneyGet code
KintsugiGet code
Long shadowGet code
LuggageGet code