# Quantity Picker URL: /components/quantity-picker Source: https://github.com/daangn/seed-design/blob/dev/docs/content/components/quantity-picker.mdx An input component that allows you to increase or decrease numeric values one step at a time using buttons. ## Anatomy ![Quantity Picker Anatomy image. Composed of Decrement Button, Value Display, and Increment Button.]() Quantity Picker consists of an Increment Button that increases the value by one step, a Decrement Button that decreases it by one step, and a Value Display area that shows the current value. ## Properties ### Size ![Quantity Picker Size Property - Small, Medium, Large]() Three sizes are provided: Small, Medium, and Large. When placing together with other input elements such as [Action Button](/components/action-button) and [Text Input](/components/text-input), maintain consistency by matching sizes. ### Value State ![Quantity Picker Value State - Min, InRange, Max]() The range of allowable values is limited by props to prevent entering values outside the range. - **Min**: State where the minimum value is reached and Decrement is not possible - **InRange**: State where both Increment and Decrement are possible - **Max**: State where the maximum value is reached and Increment is not possible ### State ![Quantity Picker State - Enabled, Disabled, Error]() Quantity Picker has three states: Enabled, Disabled, and Error. - **Enabled**: Default state where value changes are possible - **Disabled**: State where value changes are not possible - **Error**: State where entered value is outside the allowed range ### Button State ![Quantity Picker Button State - Enabled, Hover/Pressed, Loading, Focused, Disabled]() Decrement Button and Increment Button each have five states: Enabled, Hover/Pressed, Loading, Focused, and Disabled. - **Enabled**: Default selectable state - **Hover/Pressed**: Light background highlight on mouse over or click/touch - **Loading**: State waiting for server response to quantity change request - **Focused**: Focus ring displayed on keyboard focus - **Disabled**: State where selection is not possible ### Removable Property ![Quantity Picker Removable Property - Removable OFF, Removable ON]() When the Removable option is enabled, the Decrement button is replaced with a Remove button when the entered value reaches the minimum. ## Guidelines ### Basic Quantity Picker Usage ![Example of Quantity Picker used in Value Min and Max states on shopping cart screen]() Quantity Picker is used on screens where quantity needs to be changed, such as shopping carts, product details, and orders. Quantity Picker limits the range of allowable values using Min and Max props. Buttons that reach the boundary are automatically disabled, preventing incorrect values from being entered in advance. ### Enabling Removable ![Example of Quantity Picker comparing Removable OFF and Removable ON on shopping cart screen]() Removable is a feature that replaces the Decrement button with a Remove button when the value reaches the minimum. It is used in contexts where further reducing the value means deleting the item. ### Choosing Size ![Example using Small size Quantity Picker]() ![Example using Medium size Quantity Picker]() When placing together with other input elements such as [Action Button](/components/action-button) and [Text Input](/components/text-input), maintain consistency by matching sizes. ### Quantity Picker Touch Area ![Example of Quantity Picker with touch area applied only to Increment and Decrement buttons]() The touch area of Quantity Picker is limited to the Increment and Decrement buttons on both sides. Value Display does not respond to touch. ## Specification ### Quantity Picker Component spec (JSON): /rootage/components/quantity-picker.json ### Quantity Picker Button Component spec (JSON): /rootage/components/quantity-picker-button.json