Components/Form
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/slider
Slider is an input field that enables our users to select a value within a given number range. It's handy when a user needs an approximate but not a precise value.
<RadioGroup/> or <NumberInput/> instead.Specify a range of a slider by defining `min` and `max` values.
Specifies what `value` slider will represent:
 - `number` (default) - use it to select value within a given range.
 - `array` - use it to select a range of values within a given range.
Control the starting point of a slider with `startPoint` prop. A default starting point is a minimum value from a defined range.
Use marks to indicate allowed selections that slider thumb will snap to. Marks are enabled by default, but can be hidden using `displayMarks` prop.
Default marks display numeric values of start and end of a range.
Control mark label alignment with the marksLabelAlignment prop, choose between:
center (default) - marks title will overflow outside slider bounds.inside - marks will be aligned inside slider edges.Set marksLabelSize to tiny or small to control the size of the marks labels. It defaults to small; tiny keeps a dense scale readable in narrow panels.
Define custom marks for each accepted selection value via `marks` prop. It accepts numeric or string values.
Define a step to reduce the amount of accepted values within a range. Default step is 1 and might not work well for larger value ranges, such as 1-1000.
Sets the slider's orientation:
horizontal (default), renders along the x‑axis.
vertical, renders along the y‑axis, useful for tight or tall layouts.
Control whether range slider handles should cross or push one another. By default handles are allowed to cross.
If `pushable` prop is set, moving the handle on top of another one will move the whole selected range.
If allowCross={false} users won't be able to cross the the handles
Use slider to control the opacity of a selected color with gradientColor prop.
Pass any color in color names, RGB or HEX formats.
Disable all slider interactions with `disabled` prop. Use it to highlight a temporary unavailable function.
Let users enter an exact value with an editable text field.
Use slider with the gradientColor prop to control the opacity of a selected color.
Use sliders in a composer to let users adjust a variety of settings such as opacity, brightness, border radius, border weight, etc.
Use a slider in a form to let users select a range of values, such as minimum and maximum values.
Use sliders to let users control color opacity and border width in a design panel.
gradientColor prop to let users control the opacity of a selected color.| Name | Type | Default | Description |
|---|---|---|---|
allowCross | boolean | true | Allows sliders handles to cross. |
ariaLabelForHandle | string | string[] | — | Set the aria-label attributes for slider handles. |
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
direction | "horizontal" | "vertical" | 'horizontal' | Sets slider direction in either horizontal way or vertical. |
disabled | boolean | false | Specifies whether interactions are disabled. |
displayMarks | boolean | true | Controls the visibility of the marks. |
displayTooltip | boolean | true | Controls visibility of slide handle tooltip. |
formatValue | (value: number) => string | — | Formats the raw value for display in tooltip. |
gradientColor | string | — | Converts slider to a slider with a gradient background. RGB, HEX formats or color names are accepted. javascript gradientColor="rgb(105, 110, 28)" gradientColor="#FFAC4B" gradientColor="pink" If the color can't be parsed, a fallback color is applied. |
id | string | — | Assigns an unique identifier for the root element. |
marks | { [key: number]: string | number; } | — | Specifies slider marks. The key determines the position, and the value determines what is shown. The object structure should be either { number : number} / { number : string } |
marksLabelAlignment | "center" | "inside" | 'center' | Sets the alignment of the marks labels. |
marksLabelSize | "small" | "tiny" | 'small' | Controls the size of the marks labels. |
max | number | 20 | Sets the absolute maximum value of sliders range. |
min | number | 1 | Sets the absolute minimum value of the sliders range. |
onAfterChange | (value: NoInferType<TValue>) => void | — | Defines a callback function which is called when ontouchend or onmouseup is triggered. |
onBeforeChange | (value: NoInferType<TValue>) => void | — | Defines a callback function which is called when ontouchstart or onmousedown is triggered. |
onBlur | (value: number | number[], event?: FocusEvent<Element, Element> | undefined) => void | — | Sets the onBlur callback for the slider's handle. javascript onBlur((handleValue) => ({})) |
onChange | (value: NoInferType<TValue>) => void | — | Defines a callback function which is called upon every value change. |
onFocus | (value: number | number[], event?: FocusEvent<Element, Element> | undefined) => void | — | Sets the onFocus callback for the slider's handle. javascript onFocus((handleValue) => ({})) |
pushable | number | false | true | — | Push surrounding handles when moving a handle (relevant for multi value sliders only). Number specifies a minimum distance between handles. |
rtl | boolean | false | Adjust component for RTL. |
startPoint | number | undefined | Specifies the starting value of a track. If undefined, the minimum value of a range is used as a starting point. |
step | number | 1 | Specifies the interval between range values. |
value | TValue | 3 | Specifies the selected value. |
No testkit for this component — it doesn't expose a unidriver testkit.
marksLabelSize prop to display mark labels in tiny or small sizes. (#16857) — has visual changesTooltip value (#15413)Last updated: 30 October 2026