Slider

Components/Form

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/slider

Overview

Copy

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.

Do

  • Use it to adjust settings, such as opacity, brightness or volume.
  • Use it to specify an accepted range of values, such as price range.
  • Use it to control color opacity.

Don't

  • Don't use it to select a value within an extremely small range (e.g., 1-3). Use <RadioGroup/> or <NumberInput/> instead.

Feature examples

Range

Specify a range of a slider by defining `min` and `max` values.

Copy

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.

Copy

Start point

Control the starting point of a slider with `startPoint` prop. A default starting point is a minimum value from a defined range.

Copy

Marks

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.

Copy

Marks label alignment

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.
Copy

Marks label size

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.

Copy

Custom marks

Define custom marks for each accepted selection value via `marks` prop. It accepts numeric or string values.

Copy

Step

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.

Copy

Direction

Sets the slider's orientation:

horizontal (default), renders along the x‑axis.

vertical, renders along the y‑axis, useful for tight or tall layouts.

Copy

Pushable & crossing handles

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

Copy

Opacity

Use slider to control the opacity of a selected color with gradientColor prop.

Pass any color in color names, RGB or HEX formats.

Copy

Disabled

Disable all slider interactions with `disabled` prop. Use it to highlight a temporary unavailable function.

Copy

Common use case examples

Editable slider

Let users enter an exact value with an editable text field.

Copy

Color opacity

Use slider with the gradientColor prop to control the opacity of a selected color.

Copy

Composer

Use sliders in a composer to let users adjust a variety of settings such as opacity, brightness, border radius, border weight, etc.

Copy

Form

Use a slider in a form to let users select a range of values, such as minimum and maximum values.

Copy

Design panel

Use sliders to let users control color opacity and border width in a design panel.

  • Use a slider with the gradientColor prop to let users control the opacity of a selected color.
  • Let users enter an exact border width using an editable text field.
Copy

Code

Copy

Props

NameTypeDefaultDescription
allowCrossbooleantrueAllows sliders handles to cross.
ariaLabelForHandlestring | string[]—Set the aria-label attributes for slider handles.
dataHookstring—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.
disabledbooleanfalseSpecifies whether interactions are disabled.
displayMarksbooleantrueControls the visibility of the marks.
displayTooltipbooleantrueControls visibility of slide handle tooltip.
formatValue(value: number) => string—Formats the raw value for display in tooltip.
gradientColorstring—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.
idstring—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.
maxnumber20Sets the absolute maximum value of sliders range.
minnumber1Sets 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) => ({}))
pushablenumber | false | true—Push surrounding handles when moving a handle (relevant for multi value sliders only). Number specifies a minimum distance between handles.
rtlbooleanfalseAdjust component for RTL.
startPointnumberundefinedSpecifies the starting value of a track. If undefined, the minimum value of a range is used as a starting point.
stepnumber1Specifies the interval between range values.
valueTValue3Specifies the selected value.

Testkit

No testkit for this component — it doesn't expose a unidriver testkit.

Changelog

  • 1.344.0 (2026-10-28) — maintenance release, no component-specific changes
  • 1.340.0 (2026-10-21) — maintenance release, no component-specific changes
  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.330.3 (2026-09-29) — maintenance release, no component-specific changes
  • 1.330.0 (2026-09-28) — maintenance release, no component-specific changes
  • 1.329.0 (2026-09-24) — maintenance release, no component-specific changes
  • 1.328.0 (2026-09-22) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.323.0 (2026-09-10) — maintenance release, no component-specific changes
  • 1.320.0 (2026-09-03) — fix: the gradient slider's thumb outline is now a lighter tint of the selected color instead of a darker one. ColorPicker: the hue slider handle can now show a border in themes that define one. (#17009) — has visual changes
  • 1.318.0 (2026-08-28) — maintenance release, no component-specific changes
  • 1.317.0 (2026-08-26) — maintenance release, no component-specific changes
  • 1.316.0 (2026-08-25) — feat: add a marksLabelSize prop to display mark labels in tiny or small sizes. (#16857) — has visual changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.295.0 (2026-07-03) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.291.0 (2026-06-19) — maintenance release, no component-specific changes
  • 1.282.0 (2026-05-27) — fix: allow handle interaction when wrapper is focused (#16290)
  • 1.278.0 (2026-05-08) — maintenance release, no component-specific changes
  • 1.277.0 (2026-05-07) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
  • 1.247.2 (2026-01-21) — maintenance release, no component-specific changes
  • 1.241.0 (2025-12-17) — maintenance release, no component-specific changes
  • 1.221.0 (2025-10-15) — feat: introduce prop to format Tooltip value (#15413)
  • 1.212.0 (2025-08-11) — maintenance release, no component-specific changes
  • 1.207.0 (2025-07-24) — maintenance release, no component-specific changes
  • 1.170.0 (2025-03-12) — fix: fix isDisabled driver method (#14588)
  • 1.167.0 (2025-03-05) — feat: add driver methods to increase and decrease value (#14584)
  • 1.165.0 (2025-02-27) — maintenance release, no component-specific changes
  • 1.138.1 (2024-10-30) — maintenance release, no component-specific changes
  • 1.128.0 (2024-09-19) — maintenance release, no component-specific changes
  • 1.126.0 (2024-09-09) — feat: add getValue testkit method (#14113)
  • 1.122.0 (2024-08-21) — feat: add marks label alignment to slider. (#14039)
  • 1.115.0 (2024-07-17) — maintenance release, no component-specific changes
  • 1.103.1 (2024-04-24) — maintenance release, no component-specific changes
  • 1.103.0 (2024-04-23) — fix: fix handle placement on studio theme (#13637)
  • 1.102.0 (2024-04-16) — breaking: reduced vertical margins for Slider (#13602)
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 30 October 2026

Did this help?