DS0
Components

ProductCard

A product display card with image, pricing, badge, rating, and add-to-cart action.

Overview

ProductCard renders a commerce-ready product display with image, title, price, optional discount badge, star rating, and an add-to-cart button.

Usage

<ProductCard
  image="/product.jpg"
  title="Wireless Headphones"
  price="$149.99"
  rating={4.5}
  badge="New"
  onAddToCart={handleAdd}
/>

API Reference

PropTypeDefaultDescription
imagestringProduct image URL
titlestringProduct name
pricestringFormatted price
originalPricestringStrike-through original price
ratingnumberStar rating (0–5)
badgestringBadge text (e.g., "Sale")
onAddToCart() => voidAdd to cart handler
ComponentWhen to Use Instead
CardGeneric content card
CartShopping cart view
RatingStandalone rating input

On this page