Skip to main contentCarbon Design System

Slider

Color

ElementPropertyColor token
Thumbfill$icon-primary
Trackbackground-color$border-subtle *
Track: filledbackground-color$border-inverse
Labeltext-color$text-secondary
Rangel labeltext-color$text-primary

* Denotes a contextual color token that will change values based on the layer it is placed on.

Slider enabled state

Interactive states

Slider uses a text input to type in values. See text input for more information on its interactive states.

StateElementPropertyColor token
FocusThumbborder$focus
Trackbackground-color$interactive
ActiveThumbfill$interactive
Trackbackground-color$interactive
ErrorText inputborder$support-error
Error iconsvg$support-error
Error messagetext-color$text-error
WarningWarning iconsvg$support-warning
Warning messagetext-color$text-primary
DisabledLabeltext-color$text-disabled
Range labeltext-color$text-disabled
Thumbfill$border-disabled
Trackbackground-color$border-disabled
Read-onlyLabeltext-color$text-secondary
Range labeltext-color$text-primary
Trackbackground-color$border-subtle *
Track:filledbackground-color$border-inverse

* Denotes a contextual color token that will change values based on the layer it is placed on.

Slider interactive states

Typography

Slider labels should be set in sentence case, with only the first word in a phrase and any proper nouns capitalized, and no more than three words.

ElementFont-size (px/rem)Font-weightType token
Label12 / 0.75Regular / 400$label-01
Range label14 / 0.875Regular / 400$body-compact-01

Structure

The width of a slider varies based on page content and layout.

ElementPropertypx / remSpacing token
Thumbheight, width14 / 0.875
Thumb:activeheight, width20 / 1.25
Thumb:activeheight, width20 / 1.25
Trackheight4 / 0.25
margin-left, margin-right8 / 0.5$spacing-03
Labelmargin-bottom8 / 0.5$spacing-03
Range labelmargin-right16 / 1$spacing-05
Error messagemargin-top16 / 1$spacing-05
State iconpadding-right, padding-left16 / 1$spacing-05
Structure and spacing measurements for slider enabled state
Structure and spacing measurements for slider error state

The following specs are not built into the slider component but are recommended by design as the proper sizing for the slider tracking line.

ElementPropertypx / remSpacing token
Slidermin-width200 / 12.5
max-width640 / 40