Vesyl UI

Slider

Pick a number — or a range of numbers — by dragging along a track. Built on base-ui Slider — pointer dragging, keyboard stepping, and ARIA wiring come for free.

Slider is a single component that renders the whole control (track, filled range, and thumbs). Pass a number for a single value; pass an array of numbers for a multi-thumb range.

Basic

Drive it with value + onValueChange and render the current value alongside. onValueChange hands you the new number directly.

Package weight12 lb

Stepped

min, max, and step define the scale and snap increment — the slider only lands on multiples of step measured from min. Use it when intermediate values are meaningless, like a box length picked in 6-inch increments.

Max box length24 in

Snaps to 6-inch increments (6–48 in).

Range (two thumbs)

Pass an array value to get a range with one thumb per entry. onValueChange returns the array, so a [min, max] band — like filtering orders by weight — falls out naturally.

Weight filter230 lb

Two thumbs from an array value — show only orders within this weight band.

Disabled

disabled blocks interaction and dims the control. Use it for values that are fixed by an upstream constraint — a carrier contract, a plan tier — but still worth showing.

Dimensional weight factor139

Locked by the carrier contract — disabled and dimmed.

Reference

Slider

The whole control. Extends base-ui Slider.Root props.

PropTypeDefaultDescription
defaultValuenumber | number[][min, max]Initial value (uncontrolled); an array renders a thumb per entry
valuenumber | number[]Current value (controlled); an array renders a thumb per entry
onValueChange(value, eventDetails) => voidFires while the value changes; value is a number, or an array for a range
onValueCommitted(value, eventDetails) => voidFires once on pointer release / commit, after dragging ends
minnumber0Lowest allowed value
maxnumber100Highest allowed value
stepnumber1Snap increment, measured from min
largeStepnumber10Step for Page Up/Down and Shift + Arrow
minStepsBetweenValuesnumber0Minimum gap (in steps) between thumbs on a range slider
disabledbooleanfalseBlock interaction and dim the control
orientation"horizontal" | "vertical""horizontal"Layout direction of the track
formatIntl.NumberFormatOptionsNumber formatting applied to the value
namestringField name when submitted inside a form
classNamestringMerged onto the control element