Slider

Slider is a component used for allowing users to select a value from a range.

Usage

import { Slider } from "@yamada-ui/react"
<Slider.Root>
  <Slider.Track>
    <Slider.Range />
    <Slider.Thumb />
  </Slider.Track>
  <Slider.Marks />
</Slider.Root>

Change Variant

Change Size

Change Color Scheme

Set Default Value

To set a default value, set a number to defaultValue.

Set Minimum and Maximum Values

To set minimum and maximum values, set a number to min or max.

Enable Range Selection

To enable range selection, set an array to defaultValue or value.

Set Minimum Distance

To set the minimum distance between thumbs, set a number to betweenThumbs.

Change Orientation

To change the orientation, set orientation to "horizontal" or "vertical". The default is "horizontal".

Use Marks

To use marks, set an array to marks.

Change Shape

Disable

To disable the slider, set disabled to true.

Read-Only

To make read-only, set readOnly to true.

Display Tooltips

Handle Start and End Events

To handle start and end events, use onChangeStart or onChangeEnd.

Value: 50, Start Value: 50, End Value: 50

Set Step Value

To set a step value, set a number to step.

Customize Styling

Control

Props

Accessibility

Currently, this section is being updated due to the migration of v2.