Butter
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initSliderButter(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-butterAbout this component
A spread slider on a slice of toast: the thumb is the tip of a butter knife and the fill is the butter it has smoothed out, streaked with knife marks. A ridge of butter rides ahead of the blade, squishing as you push and thinning as it runs out over the slice.
- Dependencies
- None
- Difficulty
- Beginner
- Reduced motion
- Respected
- Theme
- Light and dark
- Follows page color-scheme
Triggers3
- State change
- Morph
- Fill
Techniques4
- Gradient
- Keyframes
- CSS variables
- border-radius
Accessibility
Keyboard and screen readers
A native range input named Butter spread with the percentage as its value text; the toast is aria-hidden.
Reduced motion
The ridge does not squish.
Use it in anything you build, commercial and client work included. Licence