Budget
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initSliderBudget(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-budgetAbout this component
A duotone price range slider: a small histogram in navy whose bars turn coral inside the chosen range and stand a little taller there, with two ring thumbs on the baseline and both prices set above.
Triggers
- State change
- Fill
- Hover
- Click
Techniques
- CSS variables
- CSS transition
- Transform only
- Spring
Difficulty
Advanced
Accessibility
Keyboard and screen readers
Two native range inputs named "Lowest price" and "Highest price", so arrow keys, Home and End work on each; everything drawn is aria-hidden. :focus-visible on an input outlines its own ring thumb.
Reduced motion
The transitions are switched off and the bars change at once.
Use it in anything you build, commercial and client work included. Licence