Product Card Hover
Linked product tile whose quick-add button slides up over the image on hover or focus, with name, price, rating and colour dots.
Parts
| Part | File | Does |
|---|---|---|
| ProductCardHover | ProductCardHover.vue | Shows a product with its image and price, with a quick-add button. |
Styling
All of Product Card Hover’s styles live in product-card-hover.json. New to styling in Frontic UI? How styling works →
Install
- npm packages
- @lucide/vue
- @vueuse/core
Built from
API reference
Shows a product with its image and price, with a quick-add button.
Props 12
| Prop | Type | Default | |
|---|---|---|---|
| product* | Product | — | |
| |||
| quickAddLabel | string | 'Quick add' | |
| |||
| addedLabel | string | 'Added' | |
| |||
| clearoutLabel | string | 'Clearout' | |
| |||
| inStoreLabel | string | 'In Store' | |
| |||
| colourLabel | string | 'Colour' | |
| |||
| moreColoursLabel | ((count: number) => string) | `+${count}` | |
| |||
| locale | string | — | |
| |||
| ratingLabel | ((score: number, max: number) => string) | — | |
| |||
| ratio | number | 1 | |
| |||
| surface | 'raised' | 'bare' | 'raised' | |
| |||
| class | ClassValue | — | |
| |||
Events 1
| Event | Payload | |
|---|---|---|
| add-to-cart | product: Product | |
| ||
Data attributes 1
| Data attribute | Values | |
|---|---|---|
| data-surface | 'raised' | 'bare' | |
| ||