E-commerce
SizePicker
Size selector buttons with unavailable state (crossed out) and size guide link.
Quick Preview
SizeSelect a size
Installation
# No extra dependencies
// Copy component fromsrc/components/ecommerce/SizePicker.tsx
Usage
import SizePicker from '@/components/ecommerce/SizePicker'<SizePickersizes={['XS', 'S', 'M', 'L', 'XL', 'XXL']}unavailable={['XS']}onSelect={(size) => console.log('Selected:', size)}/>
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 |
|---|---|---|---|
sizes | string[] | - | Available size options |
unavailable | string[] | - | Sizes that are out of stock |
label | string | 'Size' | Label above the buttons |
onSelect | (size: string) => void | - | Selection callback |
className | string | - | Additional CSS classes |