Bendy slider
A tactile slider that bends at the edges.
Installation
npx shadcn@latest add qubydev/bunui/bendy-sliderHow to use
demo.tsx
import { BendySlider } from "@/components/ui/bendy-slider"export function Demo() {return <BendySlider defaultValue={50} />}
Props
Options you can pass to customize this component.
Prop
Type
Description
valuenumberControlled slider value between min and max.
defaultValuenumberInitial value when uncontrolled. Defaults to track center.
minnumberMinimum slider value.
maxnumberMaximum slider value.
stepnumberStep increment value.
onValueChange(value: number) => voidCalled whenever the slider value changes during dragging or navigation.
onValueCommit(value: number) => voidCalled when dragging ends or keyboard input commits.
iconReact.ReactNodeLeading icon rendered on the left of the slider track.
formatValue(value: number) => React.ReactNodeCustom formatter for the value/percentage label on the right.
sizesmdefaultlgHeight and knob sizing scale.
maxBendnumberMaximum curvature displacement in pixels at the edges.
disabledbooleanDisables interaction and dims the slider.
classNamestringExtra classes merged onto the slider root element.
Dependencies
lucide-react
License & Usage
- •Free to use and modify in personal and commercial projects.
- •Attribution to Bun UI is appreciated when using a component.
- •Please do not resell the components as your own kit.