E-commerce
QuantitySelector
+/โ quantity input with min/max clamping and direct number editing.
Quick Preview
Installation
# No extra dependencies
// Copy component fromsrc/components/ecommerce/QuantitySelector.tsx
Usage
import QuantitySelector from '@/components/ecommerce/QuantitySelector'<QuantitySelectorvalue={1}min={1}max={10}onChange={(qty) => console.log('Quantity:', qty)}/>
Examples
With min/max constraints
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | 1 | Initial quantity |
min | number | 1 | Minimum value |
max | number | 99 | Maximum value |
onChange | (value: number) => void | - | Change callback |
className | string | - | Additional CSS classes |