Neumorphic

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/toggle-neumorphic

About this component

A dark neumorphic toggle with a recessed track and physically-raised knob created entirely from layered box-shadows. Off: dark extruded knob on dark track. On: light knob with glow slides right, track gains a soft inner glow.

Triggers

  • Click
  • State change
  • Neumorphic
  • Spring

Techniques

  • Transform only

Difficulty

Beginner

Moves on

Its code uses this curve. Open one to see it plotted and tune it.

Accessibility

Keyboard and screen readers

role="switch" + aria-checked.

Reduced motion

Knob slide transition skipped under prefers-reduced-motion.

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

More toggles

See all
PowerGet code