CodeAI

Slider

Continuous or stepped value control with optional ± buttons, display value, and stepper ticks. Track fill uses selected tokens.

Appearance

Content

Value

State

Layout & behavior

Accessibility

Props — Slider
View MUI docs
PropTypeDescription
size"large" | "medium" | "small" | "extraSmall"Label and helper type scale.
sentiment"default" | "error"Field-level error styling.
labelReactNodeField label above the control.
displayValueReactNodeCustom value shown in the label row.
showDisplayValuebooleanShow current value beside the label.
showLabelRowbooleanShow the label and value row.
helperTextReactNodeHelper or validation message below.
helperIconNameFaIconNameOptional icon beside helper text.
showHelperbooleanShow helper row when helperText is set.
showControlsbooleanShow ± buttons beside the track (nudge by step).
showTicksbooleanShow value labels under the track. Follows step; continuous (step=null) shows only min and max.
startsFrom"side" | "center"Track fill origin. "side" fills min→value (0…100); "center" is bipolar around 0 (−100…100).
minnumberRange minimum. Defaults to 0 (side) or -100 (center).
maxnumberRange maximum. Default 100 for side and center.
widthnumber | stringControl width. Numbers are px. Ignored when fullWidth.
fullWidthbooleanStretch to 100% of the parent.
valuenumber | number[]Controlled value.
defaultValuenumber | number[]Uncontrolled initial value. Defaults to 50 (side) or 0 (center).
stepnumber | nullValue increment for drag, ±, and tick labels. null = continuous (endpoint ticks only).
disabledbooleanDisables interaction.
onChange(event, value, activeThumb) => voidCalled when the value changes.
aria-labelstringAccessible name for the slider.