Slider

Single-thumb or dual-thumb range slider for numeric input within a defined min/max boundary.

import{ Slider, RangeSlider } from "@pepulux/ui"

Single slider — uncontrolled

Uses defaultValue. No external state needed.

Controlled — with value label

Figma Label=Bottom shows the value under the handle.

40
70

Label: Top floating

Figma Label=Top floating shows the value in a chip above each handle. Works for Slider and RangeSlider; formatLabel customises the text.

40%
25%
50%

Range slider with Label: Bottom

25%
50%

Custom step

Snaps to multiples of step. Here step=10.

50

Range slider (dual handles)

Two draggable handles define a low and high bound.

$200 – $800
18 – 45 yrs

Disabled

Interaction is blocked but the current position is preserved.

60

Props

PropTypeDefaultDescription
valuenumber—Controlled value (Slider)
defaultValuenumber—Uncontrolled initial value
minnumber0Minimum value
maxnumber100Maximum value
stepnumber1Value snap increment
label"none" | "bottom" | "top-floating""none"Figma Label — False | Bottom (value under the handle) | Top floating (value chip above the handle)
formatLabel(value: number) => ReactNode—Formats the label text, e.g. (v) => `${v}%`
onChange(value: number) => void—Called when value changes
disabledbooleanfalseDisables drag interaction
classNamestring—Additional CSS classes

Props

PropTypeDefaultDescription
value[number, number]—Controlled [low, high] pair (RangeSlider)
defaultValue[number, number]—Uncontrolled initial range
minnumber0Minimum value
maxnumber100Maximum value
stepnumber1Value snap increment
onChange(value: [number, number]) => void—Called when either handle moves
disabledbooleanfalseDisables both handles
Base component → Sliderswww.pepulux.com

Notes and documentation

Space for notes, documentation, and best practices for using these components.

Pick a value in a range

Use a slider when an approximate value is fine. Show the current value with a label and add a range for min / max selection.