Eye

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/toggle-eye

About this component

A visibility switch you can read at a glance. Off, the eye is shut with its lashes down; on, the lids part, the eye glances left and right, then settles and blinks now and then while it stays open. Pure CSS on a native switch.

Triggers

  • Click
  • State change
  • Icon
  • Loop

Techniques

  • clip-path
  • SVG
  • Keyframes

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

Native checkbox with role="switch" inside a <label>. The visible label text names it. Focus ring on the visual via :focus-visible.

Reduced motion

The change is instant.

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

More toggles

See all
FanGet code
FaucetGet code
Split FlapGet code
Neon SignGet code