Interface: ProductCardProps
Defined in: components/ProductCard.tsx:47
Props for the root <ProductCard> (and the back-compat monolithic
variant). Most fields are display toggles preserved for back-compat; in
the new compound API, consumers control rendering by composition instead
— see the Subcomponents section below.
Properties
addToCartComponent?
optionaladdToCartComponent?:ComponentType<AddToCartComponentProps>
Defined in: components/ProductCard.tsx:235
Replaces the default add-to-cart control. Receives AddToCartComponentProps.
addToCartLabels?
optionaladdToCartLabels?:Record<string,string>
Defined in: components/ProductCard.tsx:222
Label overrides forwarded to the embedded AddToCart component.
afterAddToCart?
optionalafterAddToCart?: (cart,item?) =>void
Defined in: components/ProductCard.tsx:206
Fires after an item has been added to the cart.
Parameters
cart
Cart
item?
CartMainItem
Returns
void
allowAddToCart?
optionalallowAddToCart?:boolean
Defined in: components/ProductCard.tsx:109
Show the AddToCart component. Defaults to true.
allowIncrDecr?
optionalallowIncrDecr?:boolean
Defined in: components/ProductCard.tsx:210
When true, the AddToCart shows quantity increment/decrement controls.
badgesComponent?
optionalbadgesComponent?:ComponentType<BadgesComponentProps>
Defined in: components/ProductCard.tsx:239
Replaces the default product badges block. Receives BadgesComponentProps.
cartId?
optionalcartId?:string
Defined in: components/ProductCard.tsx:180
ID of the cart that add-to-cart targets.
childItems?
optionalchildItems?:number[]
Defined in: components/ProductCard.tsx:186
Pre-selected child item product IDs added alongside the product.
children?
optionalchildren?:ReactNode
Defined in: components/ProductCard.tsx:66
Compound API: provide subcomponents as children. When omitted, the monolithic legacy layout renders based on the show
className?
optionalclassName?:string
Defined in: components/ProductCard.tsx:163
Extra CSS class applied to the root element.
clusterId?
optionalclusterId?:number
Defined in: components/ProductCard.tsx:184
Cluster ID when this card represents a variant of a product cluster.
columns?
optionalcolumns?:number
Defined in: components/ProductCard.tsx:160
Number of grid columns — when 1 the card renders as a compact horizontal row.
companyId?
optionalcompanyId?:number
Defined in: components/ProductCard.tsx:216
Active company ID from the company switcher.
configuration?
optionalconfiguration?:any
Defined in: components/ProductCard.tsx:182
Configuration object (URL builders, image filters, etc.).
createCart?
optionalcreateCart?:boolean
Defined in: components/ProductCard.tsx:192
When true, a new cart is created if no cartId is set.
enableAddFavorite?
optionalenableAddFavorite?:boolean
Defined in: components/ProductCard.tsx:139
Renders a heart-icon toggle button on the product image. Defaults to false.
enableStockValidation?
optionalenableStockValidation?:boolean
Defined in: components/ProductCard.tsx:212
When true, stock availability is validated before adding to cart.
favoriteComponent?
optionalfavoriteComponent?:ComponentType<FavoriteComponentProps>
Defined in: components/ProductCard.tsx:241
Replaces the default favorite-toggle. Receives FavoriteComponentProps.
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: components/ProductCard.tsx:176
GraphQL client for the embedded AddToCart. Resolved from PropellerProvider when omitted.
imageComponent?
optionalimageComponent?:ComponentType<ImageComponentProps>
Defined in: components/ProductCard.tsx:237
Replaces the default product image block. Receives ImageComponentProps.
imageLabels?
optionalimageLabels?:string[]
Defined in: components/ProductCard.tsx:123
Attribute codes/names to look up and display as badge overlays on the product image. Example: ['new', 'sale']
includeTax?
optionalincludeTax?:boolean
Defined in: components/ProductCard.tsx:155
When true, tax-inclusive (net) price is the leading price. Defaults to false.
labels?
optionallabels?:Record<string,string>
Defined in: components/ProductCard.tsx:134
Override any UI string. Keys: addToFavorites, removeFromFavorites
language?
optionallanguage?:string
Defined in: components/ProductCard.tsx:214
Language code for localised content. Resolved from PropellerProvider when omitted.
notes?
optionalnotes?:string
Defined in: components/ProductCard.tsx:188
Order-line notes forwarded with the add-to-cart request.
onAddToCart?
optionalonAddToCart?: (product,clusterId?,quantity?,childItems?,notes?,price?,showModal?) =>Cart
Defined in: components/ProductCard.tsx:196
Delegation handler — when provided, the parent performs the add-to-cart itself.
Parameters
product
Product
clusterId?
number
quantity?
number
childItems?
CartChildItemInput[]
notes?
string
price?
number
showModal?
boolean
Returns
Cart
onCartCreated?
optionalonCartCreated?: (cart) =>void
Defined in: components/ProductCard.tsx:194
Fires when add-to-cart creates a new cart.
Parameters
cart
Cart
Returns
void
onProceedToCheckout?
optionalonProceedToCheckout?: () =>void
Defined in: components/ProductCard.tsx:218
Fires when the "Proceed to checkout" modal button is clicked.
Returns
void
onProductClick?
optionalonProductClick?: (product) =>void
Defined in: components/ProductCard.tsx:150
Called when the product name or image is clicked.
When provided, the default <a> navigation is prevented.
Parameters
product
Product
Returns
void
onRequestQuoteClick?
optionalonRequestQuoteClick?: (cart) =>void
Defined in: components/ProductCard.tsx:220
Fires when the user requests a quote from the AddToCart modal.
Parameters
cart
Cart
Returns
void
onToggleFavorite?
optionalonToggleFavorite?: (product,isFavorite) =>void
Defined in: components/ProductCard.tsx:142
Called whenever the favourite state is toggled.
Parameters
product
Product
isFavorite
boolean
Returns
void
price?
optionalprice?:number
Defined in: components/ProductCard.tsx:190
Custom price override forwarded with the add-to-cart request.
priceComponent?
optionalpriceComponent?:ComponentType<PriceComponentProps>
Defined in: components/ProductCard.tsx:231
Replaces the default price block. Receives PriceComponentProps.
priceLabels?
optionalpriceLabels?:Record<string,string>
Defined in: components/ProductCard.tsx:225
Translated labels forwarded to the embedded <ProductPrice> display.
See ProductPriceProps.labels for slugs (inclTax, exclTax, loginToSeePrices).
product
product:
Product
Defined in: components/ProductCard.tsx:51
The product object to display
showAvailability?
optionalshowAvailability?:boolean
Defined in: components/ProductCard.tsx:97
Show only the availability indicator (Available / Not available) inside ItemStock.
Only relevant when showStock is true.
Defaults to true.
showImage?
optionalshowImage?:boolean
Defined in: components/ProductCard.tsx:74
Show the product image. Defaults to true.
showManufacturer?
optionalshowManufacturer?:boolean
Defined in: components/ProductCard.tsx:83
Show the product manufacturer. Defaults to false.
showModal?
optionalshowModal?:boolean
Defined in: components/ProductCard.tsx:208
When true, show a confirmation modal after add-to-cart instead of a toast.
showName?
optionalshowName?:boolean
Defined in: components/ProductCard.tsx:71
Show the product name. Defaults to true.
showPrice?
optionalshowPrice?:boolean
Defined in: components/ProductCard.tsx:103
Show the price below the product name. Defaults to true.
showShortDescription?
optionalshowShortDescription?:boolean
Defined in: components/ProductCard.tsx:77
Show the product short description. Defaults to false.
showSku?
optionalshowSku?:boolean
Defined in: components/ProductCard.tsx:80
Show the product SKU. Defaults to true.
showStock?
optionalshowStock?:boolean
Defined in: components/ProductCard.tsx:90
Show the stock / availability widget below the product name.
Uses the embedded ItemStock component driven by product.inventory.
Defaults to false.
stockComponent?
optionalstockComponent?:ComponentType<StockComponentProps>
Defined in: components/ProductCard.tsx:233
Replaces the default stock/availability block. Receives StockComponentProps.
stockLabels?
optionalstockLabels?:Record<string,string>
Defined in: components/ProductCard.tsx:115
Label overrides forwarded to the embedded ItemStock component. Keys: inStock, outOfStock, lowStock, available, notAvailable, pieces
textLabels?
optionaltextLabels?:string[]
Defined in: components/ProductCard.tsx:129
Attribute codes/names to look up and display as extra text rows below the product name. Example: ['brand', 'color']
urlPattern?
optionalurlPattern?:string
Defined in: components/ProductCard.tsx:170
URL pattern controlling which segments appear in product links. Tokens: page → 'product', id → productId, slug → slug value. Defaults to 'page/id/slug'.
user?
optionaluser?:Contact|Customer|null
Defined in: components/ProductCard.tsx:178
Authenticated user. Resolved from PropellerProvider when omitted.