Mach

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/slider-mach

About this component

An airspeed slider in Mach numbers: the thumb sends out a sound wave every tenth of a second while it flies, so below Mach 1 the rings bunch up ahead of it, at Mach 1 they pile into a wall and a vapour cone flashes, and above it they trail behind in a shock cone.

Dependencies
None
Difficulty
Advanced
Reduced motion
Respected
Theme
Light and dark
Follows page color-scheme

Triggers3

  • State change
  • Continuous
  • Ambient

Techniques4

  • requestAnimationFrame
  • SVG
  • CSS variables
  • Keyframes

Accessibility

Keyboard and screen readers

A native range input named Airspeed with the Mach number as its value text; the waves are aria-hidden.

Reduced motion

The waves are hidden and the streaks hold still.

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

More sliders

See all
MarblingGet code
PicketGet code
RivetGet code
RugGet code