Loupe

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/slider-loupe

About this component

A slider whose white thumb turns into a clear glass lens while you drag it: it swells and magnifies the track and the edge of the blue fill beneath it, then shrinks back to a solid pill when you let go.

Triggers

  • State change
  • Morph

Techniques

  • CSS variables
  • CSS transition

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native range input (aria-label "Brightness") laid over the drawn track at zero opacity, so dragging, clicking, keys and screen readers all work as usual; the drawing is aria-hidden and :focus-visible outlines the thumb.

Reduced motion

The transitions and loops stop and the component jumps straight to its final state.

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

More sliders

See all
ReedGet code
VolumeGet code
WarmthGet code
AcidGet code