In Input
What is a Stepper component?
A Stepper is a control element that allows users to increment or decrement values easily. It typically consists of two buttons for increasing and decreasing a numerical value, along with a display area that shows the current value.
When to use Stepper?
You should use a Stepper when you need to allow users to input numerical values in a controlled manner. It is particularly useful in forms where precise values are required, such as setting quantities, adjusting settings, or selecting values within a defined range.
When not to use Stepper?
Avoid using a Stepper when the range of values is too large or when users need to enter arbitrary numbers that are not easily incremented or decremented. In such cases, a text input field may provide a better user experience.
What is the anatomy of a Stepper?
The anatomy of a Stepper includes two main buttons for incrementing and decrementing the value, a display area that shows the current value, and often visual cues such as disabled states when the limits are reached. The design is usually simple and user-friendly, ensuring that users can easily interact with the control.