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.

States: Default, Hover

Parts

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

Styling

PartRecipe
ProductCardBasicproduct-card-basic
ProductCardBasicproduct-card-basic-image
ProductCardBasicpart-title
ProductCardBasicmeta

Install

Writes 3 files into components/sections/product-card-basic/. For agents, npx @frontic/ui docs product-card-basic prints this reference as markdown; the MCP server serves the same.

npm packages
@lucide/vue
@vueuse/core

Built from

API reference

ProductCardBasic ProductCardBasic.vue

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

PropTypeDefault
product*Product—
eyebrowstring—
addToCartLabelstring'Add to Cart'
addedLabelstring'Added'
clearoutLabelstring'Clearout'
inStoreLabelstring'In Store'
localestring—
ratingLabel((score: number, max: number) => string)—
surface'raised' | 'bare''raised'
classClassValue—
EventPayload
add-to-cartproduct: Product
Data attributeValues
data-surface'raised' | 'bare'
Recipe product-card-basicSets
base: product-card-basic 1 property
Recipe product-card-basic-imageSets
base: product-card-basic-image 1 property
Recipe part-titleSets
base: part-title 4 properties
Recipe metaSets
base: meta 3 properties
Example
State