product-card-basic

Product Card Basic

Product tile with sale and stock badges, rating, price, colour swatches that switch the image, and an add-to-cart button that confirms the add.

Parts

PartFileDoes
ProductCardBasicProductCardBasic.vueShows a product with its image, price and rating, with an add-to-cart button.

Styling

All of Product Card Basic’s styles live in product-card-basic.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@lucide/vue
@vueuse/core

Built from

API reference

ProductCardBasic.vue

Shows a product with its image, price and rating, with an add-to-cart button.

Props 13

PropTypeDefault
product*Product—
eyebrowstring—
addToCartLabelstring'Add to Cart'
addedLabelstring'Added'
clearoutLabelstring'Clearout'
inStoreLabelstring'In Store'
colourLabelstring'Colour'
moreColoursLabel((count: number) => string)`+${count}`
localestring—
ratingLabel((score: number, max: number) => string)—
rationumber1
surface'raised' | 'bare''raised'
classClassValue—

Events 1

EventPayload
add-to-cartproduct: Product

Data attributes 1

Data attributeValues
data-surface'raised' | 'bare'

Recipe product-card-basic 1 group

Recipe product-card-basic-image 1 group

Recipe product-card-title 1 group

Recipe product-card-lift 1 group

Recipe meta 1 group

Recipe focus-ring 1 group

Product Card Basic
State