Peek

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-peek

About this component

A password field whose show/hide toggle is a living eye. Hidden, the eye is shut; showing the password blinks it open, and while it is open the pupil follows your caret along the text.

Triggers

  • Click
  • State change
  • Icon swap
  • Mouse tracking

Techniques

  • SVG
  • CSS variables
  • CSS transition
  • Spring

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

The toggle is a real button with aria-pressed and an aria-label that switches between "Show password" and "Hide password"; pressing it keeps focus and the selection in the field.

Reduced motion

The eye swaps without animating.

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

More inputs

See all
AuroraGet code