Skip to content

Slider

Props

API reference for Slider. For usage examples, see the React tab.

Slider.Root

NameTypeDefault
childrenChildrenOrFunction<SliderRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

formatOptionsNumberFormatOptions

The display format of the value label.

hasMarksboolean

Adds the marks to the Track and the MarkLabels

isDisabledboolean

Whether the whole Slider is disabled.

marksIntervalnumber1

Sets the interval of the marks that display on the track, as well as the mark labels

maxValuenumber10

The slider's maximum value.

minValuenumber0

The slider's minimum value.

Slider.Description

NameTypeDefault
aboutstring
accessKeystring
autoSavestring
childrenReactNode
colorstring
contentstring
contextMenustring
dangerouslySetInnerHTML{ __html: string | TrustedHTML; }
datatypestring
defaultCheckedboolean
elementTypestring
exportpartsstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts (opens in new tab)

inlistany
inputMode"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url"

Hints at the type of data that might be entered by the user while editing the element or its contents

See: https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute (opens in new tab)

isInvalidboolean
itemIDstring
itemPropstring
itemRefstring
itemScopeboolean
itemTypestring
partstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part (opens in new tab)

prefixstring
propertystring
radioGroupstring
relstring
resourcestring
resultsnumber
revstring
securitystring
titlestring
typeofstring
unselectable"off" | "on"
vocabstring

Slider.Label

NameTypeDefault
aboutstring
accessKeystring
autoSavestring
childrenReactNode
colorstring
contentstring
contextMenustring
dangerouslySetInnerHTML{ __html: string | TrustedHTML; }
datatypestring
defaultCheckedboolean
elementTypestring
exportpartsstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts (opens in new tab)

htmlForstring
inlistany
inputMode"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url"

Hints at the type of data that might be entered by the user while editing the element or its contents

See: https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute (opens in new tab)

isDisabledboolean

Whether the Label is on a disabled input or element.

isRequiredboolean

Whether the Label is on a required input or element.

itemIDstring
itemPropstring
itemRefstring
itemScopeboolean
itemTypestring
partstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part (opens in new tab)

prefixstring
propertystring
radioGroupstring
relstring
resourcestring
resultsnumber
revstring
securitystring
titlestring
typeofstring
unselectable"off" | "on"
vocabstring

Slider.MarkLabels

NameTypeDefault
formatter((value: number) => string)

Function that formats the label

labelsIntervalnumber1

Sets the interval of the mark labels

Slider.Output

NameTypeDefault
childrenChildrenOrFunction<SliderRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

Slider.Thumb

NameTypeDefault
childrenChildrenOrFunction<SliderThumbRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

indexnumber0

Index of the thumb within the slider.

inputRefRefObject<HTMLInputElement | null>

A ref for the HTML input element.

isDisabledboolean

Whether the Thumb is disabled.

isInvalidboolean
isRequiredboolean
orientationDeprecatedOrientation'horizontal'

The orientation of the Slider.

- pass to the slider instead.

Slider.Track

NameTypeDefault
childrenChildrenOrFunction<SliderTrackRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

hasMarksboolean

Adds the marks to the Track and the MarkLabels

marksIntervalnumber1

Sets the interval of the marks that display on the track