label | string · requiredLabel text (always rendered for accessibility). |
|---|
value | number | [number, number] · requiredCurrent value: a number for single thumb mode or [number, number] for range mode. |
|---|
onChange | (value: number) => void | (value: [number, number]) => voidCallback fired on value change during drag. |
|---|
onChangeEnd | (value: number) => void | (value: [number, number]) => voidCallback fired when drag ends. |
|---|
min | number · default 0Minimum value. |
|---|
max | number · default 100Maximum value. |
|---|
step | number · default 1 |
|---|
orientation | 'horizontal' | 'vertical' · default 'horizontal'Orientation of the slider. |
|---|
formatValue | (value: number) => stringCustom value formatting function used for display and aria-valuetext. |
|---|
valueDisplay | 'tooltip' | 'text' | 'none' · default 'tooltip'How the current value is displayed. |
|---|
marks | Array<{ value: number; label?: string }>Tick marks at specified positions with optional labels. Unfilled marks use the track color; marks inside the filled region (at or behind the thumb, or between the thumbs in range mode) use the fill color. |
|---|
minStepsBetweenThumbs | number · default 0Minimum number of steps between thumbs in range mode; prevents thumbs from overlapping. |
|---|
isDisabled | boolean · default falseWhether the slider is disabled. |
|---|
htmlName | stringThe HTML name attribute for form submissions. Renders hidden inputs carrying the current value (two entries in range mode). |
|---|
disabledMessage | stringExplains why the slider is disabled. With isDisabled, shows a tooltip on hover/keyboard focus and keeps the thumb focusable via aria-disabled (value changes stay blocked). Use this instead of wrapping a disabled Slider in Tooltip. Disabled controls swallow the hover events an external Tooltip needs. |
|---|
isOptional | boolean · default falseWhether the field is optional. |
|---|
isRequired | boolean · default falseWhether the field is required. |
|---|
isLabelHidden | boolean · default falseWhether to visually hide the label. |
|---|
description | stringDescription text rendered below the label. |
|---|
status | {type: 'warning' | 'error' | 'success', message?: string}Status indicator object ({ type, message }) for validation feedback. |
|---|
labelTooltip | stringTooltip text for an info icon displayed next to the label. |
|---|
width | SizeValueWidth of the field (number = pixels, string used as-is, e.g. "100%"). Sizes the whole field (label, control, and status) so they stay aligned. |
|---|
xstyle | StyleXStylesStyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}. |
|---|