product-options
Product Options
Product buy box with the product shot, price and rating, colour swatches, size choice with sold-out sizes, a quantity stepper, and add-to-cart and wishlist actions.
States: Default
Parts
| Part | File | Does |
|---|---|---|
| ProductOptions | ProductOptions.vue | Lets the shopper choose colour, size and quantity, then add the product to the cart. |
Styling
| Part | Recipe |
|---|---|
| ProductOptions | product-options-image |
Install
Writes 3 files into components/sections/product-options/. For agents, npx @frontic/ui docs product-options prints this reference as markdown; the MCP server serves the same.
- npm packages
- @lucide/vue
Built from
API reference
ProductOptions ProductOptions.vue
Lets the shopper choose colour, size and quantity, then add the product to the cart.
| Prop | Type | Default | |
|---|---|---|---|
| title* | string | — | |
| description | string | — | |
| price* | PriceType | — | |
| image | string | — | |
| imageAlt | string | — | |
| rating | number | — | |
| ratingCount | number | — | |
| colours | ProductColour[] | [] | |
| sizes | ProductSize[] | [] | |
| maxQuantity | number | 10 | |
| colourLabel | string | 'Colour' | |
| sizeLabel | string | 'Size' | |
| quantityLabel | string | 'Quantity' | |
| addToCartLabel | string | 'Add to cart' | |
| wishlistLabel | string | 'Save to wishlist' | |
| surface | 'raised' | 'bare' | 'raised' | |
| class | ClassValue | — | |
| colour | string | — | |
| size | string | — | |
| quantity | number | 1 | |
| Event | Payload | |
|---|---|---|
| wishlist | — | |
| update:colour | value: string | undefined | |
| update:size | value: string | undefined | |
| update:quantity | value: number | |
| addToCart | selection: ProductSelection | |
| Data attribute | Values | |
|---|---|---|
| data-surface | 'raised' | 'bare' | |
| Recipe product-options-image | Sets | |
|---|---|---|
| base: product-options-image | 2 properties | |
Example