Elements

Reference

Slider

Slider, dressed in the paper-and-ink system: a recessed track the primary ink runs along, a paper-seal thumb, and hairline tick markers. The parts — Root, Label, ValueText, Control, Track, Range, Thumb, MarkerGroup, Marker, DraggingIndicator, HiddenInput.

Root · Label · Thumb · ValueText · Track · Range · Control · MarkerGroup · Marker · DraggingIndicator

#Control

A styled part — no props of its own; it takes the anatomy's shared styling.

#DraggingIndicator

A styled part — no props of its own; it takes the anatomy's shared styling.

#HiddenInput

A styled part — no props of its own; it takes the anatomy's shared styling.

#Label

A styled part — no props of its own; it takes the anatomy's shared styling.

#MarkerGroup

A styled part — no props of its own; it takes the anatomy's shared styling.

#Marker

PropTypeDefaultDescription
valuenumber—

#Range

A styled part — no props of its own; it takes the anatomy's shared styling.

#Root

PropTypeDefaultDescription
sizeString as PropType<"sm" | "md" | "lg">"md"One rung of the part-size ladder for the thumb seal.
aria-labelstring[]The aria-label of each slider thumb. Useful for providing an accessible name to the slider
aria-labelledbystring[]The id of the elements that labels each slider thumb. Useful for providing an accessible name to the slider
defaultValuenumber[]The initial value of the slider when rendered. Use when you don't need to control the value of the slider.
dir'ltr' | 'rtl'"ltr"The document's text/writing direction.
disabledbooleanWhether the slider is disabled
formstringThe associate form of the underlying input element.
getAriaValueText(details: slider.ValueTextDetails) => stringFunction that returns a human readable value for the slider thumb
getRootNode() => ShadowRoot | Document | NodeA root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.
idstringThe unique identifier of the machine.
idsPartial<{ root: string; thumb(index: number): string; hiddenInput(index: number): string; control: string; track: string; range: string; label: string; valueText: string; marker(index: number): string; }>The ids of the elements in the slider. Useful for composition.
invalidbooleanWhether the slider is invalid
largeStepnumber10 * stepThe amount to increment or decrement the value by when the shift key is held, or the page up/down keys are pressed
maxnumber100The maximum value of the slider
minnumber0The minimum value of the slider
minStepsBetweenThumbsnumber0The minimum permitted steps between multiple thumbs.
modelValuenumber[]The v-model value of the slider
namestringThe name associated with each slider thumb (when used in a form)
orientation'vertical' | 'horizontal'"horizontal"The orientation of the slider
origin'start' | 'center'"start"The origin of the slider range - "start": Useful when the value represents an absolute value - "center": Useful when the value represents an offset (relative)
readOnlybooleanWhether the slider is read-only
stepnumber1The step value of the slider
thumbAlignment'center' | 'contain'"contain"The alignment of the slider thumb relative to the track - center: the thumb will extend beyond the bounds of the slider track. - contain: the thumb will be contained within the bounds of the track.
thumbCollisionBehavior'none' | 'push' | 'swap'"none"How thumbs behave when they collide during pointer interactions - none: Thumbs cannot move past each other - push: Thumbs push each other - swap: Thumbs swap places
thumbSize{ width: number; height: number; }The slider thumbs dimensions
EventPayload
focusChangedetails: FocusChangeDetails
valueChangedetails: ValueChangeDetails
update:modelValuevalue: number[]
valueChangeEnddetails: ValueChangeDetails

#Thumb

PropTypeDefaultDescription
indexnumber—
namestring | undefined—

#Track

A styled part — no props of its own; it takes the anatomy's shared styling.

#ValueText

A styled part — no props of its own; it takes the anatomy's shared styling.