Back to compare picker

Slider vs Text input vs Select vs Toggle switch

Use a slider for one adjustable value along a bounded range when relative position matters; use text input for precise numeric entry, select for a short fixed set, and toggle switch for binary on/off settings.

Learn the decision

Match the interaction to the person's task

Use a slider for one adjustable value along a bounded range when relative position matters; use text input for precise numeric entry, select for a short fixed set, and toggle switch for binary on/off settings.

Slider

Use it when: Users adjust one bounded value such as brightness, volume, opacity, zoom, intensity, cost tolerance, or preference strength.

Make this state clear: Initial value state with visible label, min, max, current value, and unit.

Observe the result: A user adjusts brightness with arrow keys, types 65 in the number field, sees both controls synchronize, and gets a warning near battery-heavy values.

Study the full pattern →

Text input

Use it when: The answer is short and user-authored.

Make this state clear: Empty untouched state with persistent label and optional hint.

Observe the result: A user leaves the required field blank, sees an error only after submit, returns to the same field, and their later typed value clears the error.

Study the full pattern →

Select

Use it when: The user chooses one option from a moderate known list.

Make this state clear: Closed state with empty option or current selected value.

Observe the result: Users can open, scan, choose one value, and review the selected value after close.

Study the full pattern →

Toggle switch

Use it when: A single setting, feature, preference, or hardware-like control has two clear states.

Make this state clear: Off state.

Observe the result: Turning the switch on immediately enables the setting and announces the applied effect.

Study the full pattern →

Practice the judgment: Imagine this situation: A two-stop slider is used for Wi-Fi on/off instead of a switch. Write the person's goal, choose one of these patterns, and show the state that helps the person continue. Use the decision rules and source trail below to explain your choice.

Review the underlying principle →

Decision dimensions

Dimension SliderText inputSelectToggle switch
UI or UX UI + UX - Single-value bounded range controlUI + UX - Single-line freeform data-entry controlUI + UX - Single-choice dropdown controlUI + UX - Immediate binary setting control
UI guidance Render one thumb on a track with a persistent label, visible current value, unit, min and max labels, focus state, and disabled or read-only state.Render a persistent label, appropriately sized single-line input, optional hint, visible focus state, and nearby error text that is programmatically associated with the field.Render a persistent label, hint text, native closed value, finite option list, selected option, and validation state.Give each control a clear label and visible state.
UX guidance Help users adjust one bounded value quickly when the relative position or intensity matters.Let users edit normally, validate after interaction or attempted submit, preserve their typed value after errors, and explain exactly how to fix invalid or missing text.Help the person reach a clear task outcome.Let users change one reversible setting immediately and understand the applied effect.
Good UI A Brightness slider shows 55%, dim and bright endpoint labels, visible focus, and a paired number input.A reference-name field has a visible label, hint, medium width, focus ring, and error message beneath the hint when submitted empty.Persistent label, hint text, visible selected value, readable options, and clear required validation state.A notifications switch with a stable Notifications label, On or Off state text, large hit target, visible focus, and immediate applied effect.
Bad UI A two-stop slider is styled like a switch but lacks on/off semantics.The only instruction is placeholder text that disappears when the user starts typing.Placeholder as the only label.A red switch labelled Delete account that behaves like an instant destructive command.
Good UX A user adjusts brightness with arrow keys, types 65 in the number field, sees both controls synchronize, and gets a warning near battery-heavy values.A user leaves the required field blank, sees an error only after submit, returns to the same field, and their later typed value clears the error.Users can open, scan, choose one value, and review the selected value after close.Turning the switch on immediately enables the setting and announces the applied effect.
Bad UX A user is asked to choose Small, Medium, or Large through a numeric rail with hidden labels.Validation fires on the first focus event and blocks typing before the user has had a chance to answer.Hiding two obvious critical choices in a dropdown.A switch appears to change but requires a hidden Save button before anything happens.
Best fit Users adjust one bounded value such as brightness, volume, opacity, zoom, intensity, cost tolerance, or preference strength.The answer is short and user-authored.The user chooses one option from a moderate known list.A single setting, feature, preference, or hardware-like control has two clear states.
Avoid when Users need to enter an exact, arbitrary, or high-stakes number.The answer is a paragraph, comment, address block, or explanation requiring multiple lines.The option set is short and comparison matters.The action is destructive, one-time, legal, financial, or needs confirmation.
Required state Initial value state with visible label, min, max, current value, and unit.Empty untouched state with persistent label and optional hint.Closed state with empty option or current selected value.Off state.
Accessibility burden Prefer native range input where possible.Associate every text input with a visible label or equivalent accessible name that matches the visible question.Prefer native semantics or implement equivalent name, role, state, and keyboard behavior.Use role switch with aria-checked or a native checkbox implementation that exposes the checked state.
Common misuse Using a slider for a binary on/off choice.Using placeholder text as the only label or instruction.Using select to hide two or three obvious choices that should be compared.Using a switch to delete, publish, pay, submit, or trigger another one-time command.

Slider

UI or UX
UI + UX - Single-value bounded range control
UI guidance
Render one thumb on a track with a persistent label, visible current value, unit, min and max labels, focus state, and disabled or read-only state.
UX guidance
Help users adjust one bounded value quickly when the relative position or intensity matters.
Good UI
A Brightness slider shows 55%, dim and bright endpoint labels, visible focus, and a paired number input.
Bad UI
A two-stop slider is styled like a switch but lacks on/off semantics.
Good UX
A user adjusts brightness with arrow keys, types 65 in the number field, sees both controls synchronize, and gets a warning near battery-heavy values.
Bad UX
A user is asked to choose Small, Medium, or Large through a numeric rail with hidden labels.
Best fit
Users adjust one bounded value such as brightness, volume, opacity, zoom, intensity, cost tolerance, or preference strength.
Avoid when
Users need to enter an exact, arbitrary, or high-stakes number.
Required state
Initial value state with visible label, min, max, current value, and unit.
Accessibility burden
Prefer native range input where possible.
Common misuse
Using a slider for a binary on/off choice.

Text input

UI or UX
UI + UX - Single-line freeform data-entry control
UI guidance
Render a persistent label, appropriately sized single-line input, optional hint, visible focus state, and nearby error text that is programmatically associated with the field.
UX guidance
Let users edit normally, validate after interaction or attempted submit, preserve their typed value after errors, and explain exactly how to fix invalid or missing text.
Good UI
A reference-name field has a visible label, hint, medium width, focus ring, and error message beneath the hint when submitted empty.
Bad UI
The only instruction is placeholder text that disappears when the user starts typing.
Good UX
A user leaves the required field blank, sees an error only after submit, returns to the same field, and their later typed value clears the error.
Bad UX
Validation fires on the first focus event and blocks typing before the user has had a chance to answer.
Best fit
The answer is short and user-authored.
Avoid when
The answer is a paragraph, comment, address block, or explanation requiring multiple lines.
Required state
Empty untouched state with persistent label and optional hint.
Accessibility burden
Associate every text input with a visible label or equivalent accessible name that matches the visible question.
Common misuse
Using placeholder text as the only label or instruction.

Select

UI or UX
UI + UX - Single-choice dropdown control
UI guidance
Render a persistent label, hint text, native closed value, finite option list, selected option, and validation state.
UX guidance
Help the person reach a clear task outcome.
Good UI
Persistent label, hint text, visible selected value, readable options, and clear required validation state.
Bad UI
Placeholder as the only label.
Good UX
Users can open, scan, choose one value, and review the selected value after close.
Bad UX
Hiding two obvious critical choices in a dropdown.
Best fit
The user chooses one option from a moderate known list.
Avoid when
The option set is short and comparison matters.
Required state
Closed state with empty option or current selected value.
Accessibility burden
Prefer native semantics or implement equivalent name, role, state, and keyboard behavior.
Common misuse
Using select to hide two or three obvious choices that should be compared.

Toggle switch

UI or UX
UI + UX - Immediate binary setting control
UI guidance
Give each control a clear label and visible state.
UX guidance
Let users change one reversible setting immediately and understand the applied effect.
Good UI
A notifications switch with a stable Notifications label, On or Off state text, large hit target, visible focus, and immediate applied effect.
Bad UI
A red switch labelled Delete account that behaves like an instant destructive command.
Good UX
Turning the switch on immediately enables the setting and announces the applied effect.
Bad UX
A switch appears to change but requires a hidden Save button before anything happens.
Best fit
A single setting, feature, preference, or hardware-like control has two clear states.
Avoid when
The action is destructive, one-time, legal, financial, or needs confirmation.
Required state
Off state.
Accessibility burden
Use role switch with aria-checked or a native checkbox implementation that exposes the checked state.
Common misuse
Using a switch to delete, publish, pay, submit, or trigger another one-time command.
Decision rules
  • Prefer a slider when users adjust one value inside a known minimum and maximum and can understand the choice by relative position, intensity, or coarse increments.
  • Prefer text input when users need an exact value, large range, unusual number, pasted value, currency amount, account value, or value with validation rules that must be typed precisely.
  • Prefer select when the set is finite and labeled, especially if options are names rather than numeric positions or if there are only a few fixed choices.
  • Prefer a toggle switch when the control has exactly two states and applying the setting immediately is clearer than selecting a numeric point.
  • Do not use a single-value slider when users need to choose a lower and upper boundary; that requires range-slider behavior with two values and collision rules.
  • Do not use a slider for one of three named options; radio groups, segmented controls, or select controls make those options easier to compare.
  • Do not use a slider for very large ranges unless users can type an exact value, use sensible steps, or otherwise avoid tedious thumb movement.
  • Show the label, current value, unit, min and max, step size when relevant, disabled/read-only state, and warning or error feedback near the control.
  • Use continuous sliders for subjective intensity where exact value is not critical, and discrete sliders when each step is meaningful and discernible.
  • If the slider value is not self-explanatory, expose user-friendly value text such as Low, Medium, High, minutes and seconds, or percent instead of only a raw number.
Inspect live examples
Failure modes
  • A two-stop slider is used for Wi-Fi on/off instead of a switch.
  • A money transfer amount uses a 100,000-step slider even though users need to enter exact cents.
  • The slider has no visible label, min, max, unit, or current value, so the thumb position has no task meaning.
  • Three named choices are collapsed into a slider, hiding option labels and making keyboard movement unclear.
  • A range boundary task is implemented as a single slider, so users can set only one side of the range.
  • The keyboard step is too granular or too coarse for the value users actually need.

Saved items