Leave Yamada UI a star

Star
Yamada UIYamada UIv1.5.1

RangeSlider

RangeSlider is a component used for users to select a range of related values.

Source@yamada-ui/slider

Props

RangeSliderProps

betweenThumbs

Description

The minimum distance between slider thumbs. Useful for preventing the thumbs from being too close together.

Type

number

Default

0

colorScheme

Description

The visual color appearance of the component.

Type

"whiteAlpha" | "blackAlpha" | "gray" | "neutral" | "red" | "danger" | "rose" | "pink" | "flashy" | "orange" | "warning" | "amber" | "yellow" | "lime" | "green" | "success" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "primary" | "info" | "link" | "indigo" | "violet" | "secondary" | "purple" | "fuchsia"

Default

primary

defaultValue

Description

The initial value of the slider.

Type

[number, number]

filledTrackColor

Description

The CSS color property. Used in color of filled track element.

Type

UIValue<"border" | "link" | Color | "current" | "focus" | "whiteAlpha.50" | "whiteAlpha.100" | "whiteAlpha.200" | "whiteAlpha.300" | "whiteAlpha.400" | "whiteAlpha.500" | ... 318 more ... | "link.950">

filledTrackProps

Description

Props for range slider filled track element.

Type

RangeSliderFilledTrackProps

focusThumbOnChange

Description

If false, the slider handle will not capture focus when value changes.

Type

boolean

Default

true

id

Description

The base id to use for the slider.

Type

string

inputProps

Description

Props for range slider input element.

Type

HTMLUIProps<"input">

isDisabled

Description

If true, the form control will be disabled.

Type

boolean

Default

false

isInvalid

Description

If true, the form control will be invalid.

Type

boolean

Default

false

isReadOnly

Description

If true, the form control will be readonly.

Type

boolean

Default

false

isRequired

Description

If true, the form control will be required.

Type

boolean

Default

false

isReversed

Description

If true, the value will be incremented or decremented in reverse.

Type

boolean

max

Description

The maximum allowed value of the slider. Cannot be less than min.

Type

number

Default

100

min

Description

The minimum allowed value of the slider. Cannot be greater than max.

Type

number

Default

0

name

Description

The name attribute of the hidden input field. This is particularly useful in forms.

Type

string | [string, string]

onChange

Description

Function called whenever the slider value changes.

Type

(value: [number, number]) => void

onChangeEnd

Description

Function called when the user is done selecting a new value.

Type

(value: [number, number]) => void

onChangeStart

Description

Function called when the user starts selecting a new value.

Type

(value: [number, number]) => void

orientation

Description

The orientation of the slider.

Type

"horizontal" | "vertical"

Default

'horizontal'

size

Description

The size of the RangeSlider.

Type

"sm" | "md" | "lg"

Default

md

step

Description

The step in which increments or decrements have to be made.

Type

number

Default

1

thumbColor

Description

The CSS background property. Used in background of thumb element.

Type

UIValue<"border" | "link" | "current" | "focus" | "whiteAlpha.50" | "whiteAlpha.100" | "whiteAlpha.200" | "whiteAlpha.300" | "whiteAlpha.400" | "whiteAlpha.500" | "whiteAlpha.600" | ... 318 more ... | Background<...>>

thumbProps

Description

Props for range slider thumb element.

Type

RangeSliderThumbProps

thumbSize

Description

The CSS box-size property. Used for calculating the width, height, and percentage of the container element. The CSS box-size property. Used in box-size of thumb element.

Type

UIValue<number | (string & {}) | "px" | "min" | "max" | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "-moz-max-content" | "-moz-min-content" | "-webkit-fit-content" | ... 73 more ... | "9xl">

trackColor

Description

The CSS color property. Used in color of track element.

Type

UIValue<"border" | "link" | Color | "current" | "focus" | "whiteAlpha.50" | "whiteAlpha.100" | "whiteAlpha.200" | "whiteAlpha.300" | "whiteAlpha.400" | "whiteAlpha.500" | ... 318 more ... | "link.950">

trackProps

Description

Props for range slider track element.

Type

RangeSliderTrackProps

trackSize

Description

The CSS height property. Used in height of track element.

Type

UIValue<number | (string & {}) | "px" | "min" | "max" | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "-moz-max-content" | "-moz-min-content" | "-webkit-fit-content" | ... 69 more ... | "9xl">

value

Description

The value of the slider.

Type

[number, number]

variant

Description

The variant of the RangeSlider.

Type

string

Edit this page on GitHub

PreviousSliderNextHueSlider