Interface: ProductCardProps
Defined in: components/ProductCard.tsx:50
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:253
Replaces the default add-to-cart control. Receives AddToCartComponentProps.
addToCartLabels?
optionaladdToCartLabels?:Record<string,string>
Defined in: components/ProductCard.tsx:237
Label overrides forwarded to the embedded AddToCart component.
afterAddToCart?
optionalafterAddToCart?: (cart,item?) =>void
Defined in: components/ProductCard.tsx:221
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:112
Show the AddToCart component. Defaults to true.
allowIncrDecr?
optionalallowIncrDecr?:boolean
Defined in: components/ProductCard.tsx:225
When true, the AddToCart shows quantity increment/decrement controls.
badgesComponent?
optionalbadgesComponent?:ComponentType<BadgesComponentProps>
Defined in: components/ProductCard.tsx:257
Replaces the default product badges block. Receives BadgesComponentProps.
belowName?
optionalbelowName?: (product) =>ReactNode
Defined in: components/ProductCard.tsx:268
Render arbitrary content directly below the product name (and above the
short description / price), in both the grid and row layouts. Receives the
product so hosts can surface extra info — e.g. package descriptions, custom
badges — without forking the card. Return null/undefined to render
nothing for a given product.
Parameters
product
Product
Returns
ReactNode
cartId?
optionalcartId?:string
Defined in: components/ProductCard.tsx:195
ID of the cart that add-to-cart targets.
childItems?
optionalchildItems?:number[]
Defined in: components/ProductCard.tsx:201
Pre-selected child item product IDs added alongside the product.
children?
optionalchildren?:ReactNode
Defined in: components/ProductCard.tsx:69
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:166
Extra CSS class applied to the root element.
clusterId?
optionalclusterId?:number
Defined in: components/ProductCard.tsx:199
Cluster ID when this card represents a variant of a product cluster.
columns?
optionalcolumns?:number
Defined in: components/ProductCard.tsx:163
Number of grid columns — when 1 the card renders as a compact horizontal row.
companyId?
optionalcompanyId?:number
Defined in: components/ProductCard.tsx:231
Active company ID from the company switcher.
configuration?
optionalconfiguration?:any
Defined in: components/ProductCard.tsx:197
Configuration object (URL builders, image filters, etc.).
createCart?
optionalcreateCart?:boolean
Defined in: components/ProductCard.tsx:207
When true, a new cart is created if no cartId is set.
currency?
optionalcurrency?:string
Defined in: components/ProductCard.tsx:247
Currency symbol used when formatting the price. Falls back to PropellerInfra.currency, then '€'.
enableAddFavorite?
optionalenableAddFavorite?:boolean
Defined in: components/ProductCard.tsx:142
Renders a heart-icon toggle button on the product image. Defaults to false.
enableStockValidation?
optionalenableStockValidation?:boolean
Defined in: components/ProductCard.tsx:227
When true, stock availability is validated before adding to cart.
favoriteComponent?
optionalfavoriteComponent?:ComponentType<FavoriteComponentProps>
Defined in: components/ProductCard.tsx:259
Replaces the default favorite-toggle. Receives FavoriteComponentProps.
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: components/ProductCard.tsx:179
GraphQL client for the embedded AddToCart. Resolved from PropellerProvider when omitted.
imageComponent?
optionalimageComponent?:ComponentType<ImageComponentProps>
Defined in: components/ProductCard.tsx:255
Replaces the default product image block. Receives ImageComponentProps.
imageLabels?
optionalimageLabels?:string[]
Defined in: components/ProductCard.tsx:126
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:158
When true, tax-inclusive (net) price is the leading price. Defaults to false.
labels?
optionallabels?:Record<string,string>
Defined in: components/ProductCard.tsx:137
Override any UI string. Keys: addToFavorites, removeFromFavorites
language?
optionallanguage?:string
Defined in: components/ProductCard.tsx:229
Language code for localised content. Resolved from PropellerProvider when omitted.
notes?
optionalnotes?:string
Defined in: components/ProductCard.tsx:203
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:211
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:209
Fires when add-to-cart creates a new cart.
Parameters
cart
Cart
Returns
void
onLoginClick?
optionalonLoginClick?: () =>void
Defined in: components/ProductCard.tsx:193
Invoked when an anonymous visitor clicks the log-in action that replaces add-to-cart in a semi-closed portal. The host owns navigation.
Returns
void
onProceedToCheckout?
optionalonProceedToCheckout?: () =>void
Defined in: components/ProductCard.tsx:233
Fires when the "Proceed to checkout" modal button is clicked.
Returns
void
onProductClick?
optionalonProductClick?: (product) =>void
Defined in: components/ProductCard.tsx:153
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:235
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:145
Called whenever the favourite state is toggled.
Parameters
product
Product
isFavorite
boolean
Returns
void
portalMode?
optionalportalMode?:string
Defined in: components/ProductCard.tsx:188
Portal access mode — 'open' / 'semi-closed' / 'closed'. Resolved from
PropellerProvider when omitted. In 'semi-closed' the card hides price and
stock from anonymous visitors and offers a log-in action in place of
add-to-cart; signed-in users are unaffected.
price?
optionalprice?:number
Defined in: components/ProductCard.tsx:205
Custom price override forwarded with the add-to-cart request.
priceComponent?
optionalpriceComponent?:ComponentType<PriceComponentProps>
Defined in: components/ProductCard.tsx:249
priceLabels?
optionalpriceLabels?:Record<string,string>
Defined in: components/ProductCard.tsx:240
Translated labels forwarded to the embedded <ProductPrice> display.
See ProductPriceProps.labels for slugs (inclTax, exclTax, loginToSeePrices).
product
product:
Product
Defined in: components/ProductCard.tsx:54
The product object to display
showAvailability?
optionalshowAvailability?:boolean
Defined in: components/ProductCard.tsx:100
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:77
Show the product image. Defaults to true.
showManufacturer?
optionalshowManufacturer?:boolean
Defined in: components/ProductCard.tsx:86
Show the product manufacturer. Defaults to false.
showModal?
optionalshowModal?:boolean
Defined in: components/ProductCard.tsx:223
When true, show a confirmation modal after add-to-cart instead of a toast.
showName?
optionalshowName?:boolean
Defined in: components/ProductCard.tsx:74
Show the product name. Defaults to true.
showPrice?
optionalshowPrice?:boolean
Defined in: components/ProductCard.tsx:106
Show the price below the product name. Defaults to true.
showShortDescription?
optionalshowShortDescription?:boolean
Defined in: components/ProductCard.tsx:80
Show the product short description. Defaults to false.
showSku?
optionalshowSku?:boolean
Defined in: components/ProductCard.tsx:83
Show the product SKU. Defaults to true.
showStock?
optionalshowStock?:boolean
Defined in: components/ProductCard.tsx:93
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:251
Replaces the default stock/availability block. Receives StockComponentProps.
stockLabels?
optionalstockLabels?:Record<string,string>
Defined in: components/ProductCard.tsx:118
Label overrides forwarded to the embedded ItemStock component. Keys: inStock, outOfStock, lowStock, available, notAvailable, pieces
textLabels?
optionaltextLabels?:string[]
Defined in: components/ProductCard.tsx:132
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:173
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:181
Authenticated user. Resolved from PropellerProvider when omitted.