Skip to content

useSlider API

API reference docs for the useSlider hook. Learn about the input parameters and other APIs of this exported module.

Demos

For examples and details on the usage of this React hook, visit the demo pages:

Import

import useSlider from '@mui/base/useSlider';

Parameters

NameTypeDefaultDescription
ref*React.Ref<any>
aria-labelledbystring
defaultValuenumber | number[]
disabledboolean
disableSwapboolean
isRtlboolean
marksboolean | Mark[]
maxnumber
minnumber
namestring
onChange(event: Event, value: number | number[], activeThumb: number) => void
onChangeCommitted(event: React.SyntheticEvent | Event, value: number | number[]) => void
orientation'horizontal' | 'vertical'
scale(value: number) => number
stepnumber | null
tabIndexnumber
valuenumber | number[]

Return value

NameTypeDefaultDescription