Getting started
Components
Both Sliders and number Inputs are form fields that take numerical values. Because the mouse and touch interaction on a Slider is less precise, use a Slider when the exact number value isn't important, for example, when selecting image opacity or audio volume.
Use a Slider when a user should select an imprecise value from a midsized and defined numerical range, such as 1–100.
Avoid errors on Sliders by changing the defined range so no errors can occur. If a user is still able to choose an invalid option, change the Slider to its error state and use Help Text to add an inline error.
Use a disabled Slider to show users that they can't interact with the Slider.
Use a custom range Slider when the default range doesn't fit your use case.
Use a Slider with hidden range labels when the range is obvious or the labels are not needed.
Use a Slider for mid-sized, defined ranges, usually 1–100.
Don't use a Slider for very large or very small ranges.
Use a number Input when an exact number value matters.
Don't use a Slider when an exact number value matters.
Use a Meter when you need to visually show the size of a numerical value, but don't want the bar to be interactive.
Don't use a disabled Slider when the value of the Slider is important to show. Disabled form fields aren't high-contrast enough to be visible.
Use a Radio Group or Radio Button Group to allow users to select a list of consecutive options with precision, whether they're numerical or not.
Don't use a Slider to allow selection of non-numerical values or when there isn't a definable range.
Help us improve this component by providing feedback, asking questions on Slack, or updating this file on GitHub.