Product

ProductGrid

Responsive product grid layout with configurable columns and gap.

ProductGrid

Wraps CProductCard in a CSS grid with responsive column breakpoints. Pass-through props to each card via cardProps. Shows an empty state when no products.

Usage

<CProductGrid
  :products="products"
  @add-to-cart="handleAddToCart"
  @toggle-wishlist="handleWishlist"
/>

Custom Columns

<CProductGrid :products="products" :columns="3" gap="lg" />

With Card Props

<CProductGrid
  :products="products"
  :card-props="{ showQuickAdd: true, showRating: true, variant: 'soft' }"
/>

Props

PropTypeDefaultDescription
productsProduct[]requiredProducts to display
columns2 | 3 | 4 | 5 | 64Grid column count
gap'sm' | 'md' | 'lg''md'Gap between items
cardPropsRecord<string, any>Props passed to each CProductCard
uiPartial<{...}>Per-instance theme overrides

Events

EventPayloadDescription
add-to-cartProductForwarded from child cards
toggle-wishlistProductForwarded from child cards

Slots

SlotScoped PropsDescription
item{ product }Custom card rendering per product
emptyCustom empty state

Example: Custom Item Rendering

<CProductGrid :products="products">
  <template #item="{ product }">
    <CProductCard :product="product" variant="ghost" show-quick-add />
  </template>
</CProductGrid>