Slider
A 4px track, an ink range and an ink thumb; a value bubble while dragging; ticks and ranges.
<div className="w-320">
<Slider aria-label="Alert threshold" defaultValue={80} formatValue={(v) => `${v}%`} />
</div>import { Slider } from "@logicplanes/kaeso-ui";Props
aria-labelstringThe accessible name, for when there is no visible label.
defaultValuenumber | number[]The value, or two values for a range, on first render.
disabledbooleanTurns it off: it can't be used, and it looks dimmed.
formatValue((value: number) => string)Formats the value in the bubble shown while dragging. Defaults to the number in the provider's language.
getAriaLabel((index: number) => string)Returns the accessible name of each thumb of a range.
maxnumber = 100The highest value allowed.
minnumber = 0The lowest value allowed.
namestringThe field name the value is sent under in a form.
onValueChange((value: number | number[]) => void)Called with the value while it is dragged.
onValueCommitted((value: number | number[]) => void)Called with the value when dragging ends.
stepnumber = 1The steps the value moves in.
ticksboolean | number[]Marks under the track at every step (or at these values).
valuenumber | number[]The value, or two values for a range, when you control it.