Disco
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initSliderDisco(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/slider-discoAbout this component
A sparkle slider whose thumb is a mirror ball: its facets turn as it spins and it throws flecks of light that sweep back across the dance floor behind it, the filled part of the track. The higher the sparkle, the more flecks and the faster the ball turns.
- Dependencies
- None
- Difficulty
- Intermediate
- Reduced motion
- Respected
- Theme
- Light and dark
- Follows page color-scheme
Triggers3
- State change
- Loop
- Glow
Techniques4
- Gradient
- Keyframes
- CSS variables
- Transition delay stagger
Accessibility
Keyboard and screen readers
A native range input named Sparkle with the percentage as its value text; the floor is aria-hidden.
Reduced motion
The ball stands still and the flecks are hidden.
Use it in anything you build, commercial and client work included. Licence