Skip to content
+

Slider

A slider is a UI element that lets users select a single value or a range of values along a bar.

Slider API

Import

import { Slider } from '@mui/base/Slider';
// or
import { Slider } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the native component are also available.

aria-label

aria-labelledby

aria-valuetext

defaultValue

disabled

disableSwap

getAriaLabel

getAriaValueText

isRtl

marks

max

min

name

onChange

onChangeCommitted

orientation

scale

slotProps

slots

step

tabIndex

track

value

valueLabelFormat


The ref is forwarded to the root element.

Slots

To learn how to customize the slot, check out the Overriding component structure guide.

root

track

rail

thumb

mark

markLabel

valueLabel

input

CSS classes

These class names are useful for styling with CSS. They are applied to the root slot when specific states are triggered.

.Mui-activeSTATE

.Mui-disabledSTATE

.Mui-focusVisibleSTATE

.MuiSlider-dragging

.MuiSlider-markActive

.MuiSlider-marked

.MuiSlider-markLabelActive

.MuiSlider-trackFalse

.MuiSlider-trackInverted

.MuiSlider-vertical