Interface: ProductGridProps
Defined in: components/ProductGrid.tsx:33
Properties
addToCartComponent?
optionaladdToCartComponent?:ComponentType<AddToCartComponentProps>
Defined in: components/ProductGrid.tsx:249
addToCartLabels?
optionaladdToCartLabels?:Record<string,string>
Defined in: components/ProductGrid.tsx:189
- Label overrides forwarded directly to the embedded AddToCart component. * Keys: add, adding, addedToCart, outOfStock, noCartId, errorAdding, * modalTitle, quantity, continueShopping, proceedToCheckout
afterAddToCart?
optionalafterAddToCart?: (cart,item?) =>void
Defined in: components/ProductGrid.tsx:179
Called after every successful add-to-cart operation.
Parameters
cart
Cart
item?
CartMainItem
Returns
void
afterItem?
optionalafterItem?: (item,index) =>ReactNode
Defined in: components/ProductGrid.tsx:265
Parameters
item
Product | Cluster
index
number
Returns
ReactNode
allowAddToCart?
optionalallowAddToCart?:boolean
Defined in: components/ProductGrid.tsx:123
- When false, hides the AddToCart control in product cards. * ClusterCards always show their "View cluster" navigation button. * Defaults to true.
allowIncrDecr?
optionalallowIncrDecr?:boolean
Defined in: components/ProductGrid.tsx:184
- Render − / + stepper buttons in AddToCart. * Defaults to true.
badgesComponent?
optionalbadgesComponent?:ComponentType<BadgesComponentProps>
Defined in: components/ProductGrid.tsx:251
beforeItem?
optionalbeforeItem?: (item,index) =>ReactNode
Defined in: components/ProductGrid.tsx:264
Parameters
item
Product | Cluster
index
number
Returns
ReactNode
brand?
optionalbrand?:string
Defined in: components/ProductGrid.tsx:76
Manufacturer/brand name — passes manufacturers: [brand] into
categoryProductSearchInput and uses config.baseCategoryId.
cartId?
optionalcartId?:string
Defined in: components/ProductGrid.tsx:176
ID of an existing cart to add items into.
categoryId?
optionalcategoryId?:number
Defined in: components/ProductGrid.tsx:64
Category ID to list products for (category-page mode).
When omitted alongside term and brand, config.baseCategoryId is used.
children?
optionalchildren?:ReactNode
Defined in: components/ProductGrid.tsx:238
Compound API: when provided, the grid renders these children inside a
<ProductGridContext> instead of its built-in grid+pagination layout.
Subcomponents (<ProductGrid.Items>, <ProductGrid.Pagination>) read
the search state via the context; consumers control the layout.
Example
<ProductGrid categoryId={17}>
<ProductGrid.Items renderItem={(item) => <ProductCard product={item as Product} />} />
<ProductGrid.Pagination />
</ProductGrid>
className?
optionalclassName?:string
Defined in: components/ProductGrid.tsx:224
Extra CSS class applied to the root element.
clusterCardComponent?
optionalclusterCardComponent?:ComponentType<ClusterCardProps>
Defined in: components/ProductGrid.tsx:259
clusterCardLabels?
optionalclusterCardLabels?:Record<string,string>
Defined in: components/ProductGrid.tsx:211
Translated labels forwarded to embedded <ClusterCard> instances.
See ClusterCardProps.labels for slugs.
columns?
optionalcolumns?:number
Defined in: components/ProductGrid.tsx:81
Number of columns in the grid. Accepts 2, 3, 4, 5, or 6. Defaults to 3.
companyId?
optionalcompanyId?:number
Defined in: components/ProductGrid.tsx:120
Active company ID from the company switcher. Overrides user's default company for price calculation. Triggers a re-fetch when changed.
configuration?
optionalconfiguration?:object
Defined in: components/ProductGrid.tsx:167
Configuration object providing: imageSearchFiltersGrid, imageVariantFiltersMedium — passed to CategoryService baseCategoryId — used when querying by term or brand urls.getProductUrl / urls.getClusterUrl — for card URL generation
baseCategoryId?
optionalbaseCategoryId?:number
imageSearchFiltersGrid?
optionalimageSearchFiltersGrid?:MediaImageProductSearchInput
imageVariantFiltersMedium?
optionalimageVariantFiltersMedium?:TransformationsInput
urls?
optionalurls?:object
urls.getClusterUrl?
optionalgetClusterUrl?: (c) =>string
Parameters
c
Cluster
Returns
string
urls.getProductUrl?
optionalgetProductUrl?: (p) =>string
Parameters
p
Product
Returns
string
createCart?
optionalcreateCart?:boolean
Defined in: components/ProductGrid.tsx:177
- Auto-create a cart when none is available. * Always pair with
onCartCreatedto persist the new cart ID.
enableAddFavorite?
optionalenableAddFavorite?:boolean
Defined in: components/ProductGrid.tsx:213
Show a heart-icon favourite toggle on each card.
favoriteComponent?
optionalfavoriteComponent?:ComponentType<FavoriteComponentProps>
Defined in: components/ProductGrid.tsx:252
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: components/ProductGrid.tsx:40
Initialised Propeller SDK GraphQL client.
Required when products is not provided — used for internal data fetching.
imageComponent?
optionalimageComponent?:ComponentType<ImageComponentProps>
Defined in: components/ProductGrid.tsx:250
includeTax?
optionalincludeTax?:boolean
Defined in: components/ProductGrid.tsx:121
- When true, tax-inclusive (gross) price is the leading price. * Defaults to false.
isLoading?
optionalisLoading?:boolean
Defined in: components/ProductGrid.tsx:91
Show a skeleton loader.
Useful when the parent controls loading state and passes products down.
The grid automatically shows a skeleton during internal fetches regardless
of this prop. Defaults to false.
labels?
optionallabels?:Record<string,string>
Defined in: components/ProductGrid.tsx:242
Translated labels keyed by the slugs used inside the component (see
getLabel calls). Missing keys fall back to the English defaults.
language?
optionallanguage?:string
Defined in: components/ProductGrid.tsx:53
Language code for product data. Defaults to 'NL'.
onCartCreated?
optionalonCartCreated?: (cart) =>void
Defined in: components/ProductGrid.tsx:178
Called after AddToCart creates a new cart internally.
Parameters
cart
Cart
Returns
void
onCategoryChange?
optionalonCategoryChange?: (category) =>void
Defined in: components/ProductGrid.tsx:150
- Called after each successful internal data fetch with the full * Category object — use to populate sibling components like GridTitle, * CategoryDescription, and CategoryShortDescription.
Parameters
category
Category
Returns
void
onClusterClick?
optionalonClusterClick?: (cluster) =>void
Defined in: components/ProductGrid.tsx:218
- Called when a cluster card name, image, or "View cluster" button is * clicked — use for SPA-style routing instead of full-page navigation.
Parameters
cluster
Cluster
Returns
void
onFiltersChange?
optionalonFiltersChange?: (filters) =>void
Defined in: components/ProductGrid.tsx:124
- Called after each internal data fetch with the filterable attributes * returned by the API (for driving a sibling FiltersSidebar).
Parameters
filters
AttributeFilter[]
Returns
void
onItemsFoundChange?
optionalonItemsFoundChange?: (count) =>void
Defined in: components/ProductGrid.tsx:138
- Called after each fetch with the total number of products found — * use to display a result count in the parent toolbar.
Parameters
count
number
Returns
void
onLoadingChange?
optionalonLoadingChange?: (isLoading) =>void
Defined in: components/ProductGrid.tsx:153
- Called whenever the internal loading state changes. * Use to disable sibling components (e.g. GridFilters) while a fetch is in flight.
Parameters
isLoading
boolean
Returns
void
onPageChange?
optionalonPageChange?: (page) =>void
Defined in: components/ProductGrid.tsx:144
- Called when the user clicks Previous / Next in the built-in pagination — * use to keep the parent URL / page state in sync.
Parameters
page
number
Returns
void
onPageItemCountChange?
optionalonPageItemCountChange?: (count) =>void
Defined in: components/ProductGrid.tsx:141
- Called after each fetch with the number of items visible on the current page * (after client-side language filtering).
Parameters
count
number
Returns
void
onPriceBoundsChange?
optionalonPriceBoundsChange?: (min,max) =>void
Defined in: components/ProductGrid.tsx:134
- Called after each internal data fetch with the min/max price of the * current product set — use to populate a price range slider in the parent.
Parameters
min
number
max
number
Returns
void
onProceedToCheckout?
optionalonProceedToCheckout?: () =>void
Defined in: components/ProductGrid.tsx:185
Called when "Proceed to checkout" is clicked in the AddToCart modal.
Returns
void
onProductClick?
optionalonProductClick?: (product) =>void
Defined in: components/ProductGrid.tsx:221
- Called when a product card name or image is clicked — use for SPA * routing instead of full-page navigation.
Parameters
product
Product
Returns
void
onProductsResponse?
optionalonProductsResponse?: (products) =>void
Defined in: components/ProductGrid.tsx:147
- Called after each successful internal data fetch with the full * ProductsResponse object — use to drive an external GridPagination * component by passing the result as its
productsprop.
Parameters
products
ProductsResponse
Returns
void
onRequestQuoteClick?
optionalonRequestQuoteClick?: (cart) =>void
Defined in: components/ProductGrid.tsx:186
Called when "Request a Quote" is clicked in the AddToCart modal.
Parameters
cart
Cart
Returns
void
onSortChange?
optionalonSortChange?: (field,order) =>void
Defined in: components/ProductGrid.tsx:130
- Called when sort state changes internally (for syncing a sibling toolbar).
Parameters
field
string
order
string
Returns
void
onToggleFavorite?
optionalonToggleFavorite?: (item,isFavorite) =>void
Defined in: components/ProductGrid.tsx:214
- Called when a favourite is toggled on any card. * Receives the full Product or Cluster object and the new favourite state.
Parameters
item
Product | Cluster
isFavorite
boolean
Returns
void
page?
optionalpage?:number
Defined in: components/ProductGrid.tsx:156
- Externally controlled current page. * When provided, the grid uses this value instead of its internal page * counter. Wire this to the
onPageChangecallback from a sibling * GridPagination so the two components stay in sync. * When changed the grid automatically re-fetches.
pageSize?
optionalpageSize?:number
Defined in: components/ProductGrid.tsx:157
- Number of products per page. Defaults to 12. * When changed the grid automatically re-fetches (page resets to 1).
portalMode?
optionalportalMode?:string
Defined in: components/ProductGrid.tsx:115
Controls portal visibility mode. 'open' — full e-commerce; AddToCart is visible in product cards. 'semi-closed' — catalog-only; AddToCart is hidden. Defaults to 'open'.
priceComponent?
optionalpriceComponent?:ComponentType<PriceComponentProps>
Defined in: components/ProductGrid.tsx:247
priceFilterMax?
optionalpriceFilterMax?:number
Defined in: components/ProductGrid.tsx:129
- Active price range upper bound from the FiltersSidebar
onPriceChange. * Triggers a re-fetch when changed.
priceFilterMin?
optionalpriceFilterMin?:number
Defined in: components/ProductGrid.tsx:128
- Active price range lower bound from the FiltersSidebar
onPriceChange. * Triggers a re-fetch when changed.
priceLabels?
optionalpriceLabels?:Record<string,string>
Defined in: components/ProductGrid.tsx:203
Translated labels forwarded to the embedded <ProductPrice> display
inside each <ProductCard>. See ProductPriceProps.labels for slugs.
productCardComponent?
optionalproductCardComponent?:ComponentType<ProductCardProps>
Defined in: components/ProductGrid.tsx:258
productCardLabels?
optionalproductCardLabels?:Record<string,string>
Defined in: components/ProductGrid.tsx:207
Translated labels forwarded to embedded <ProductCard> instances.
See ProductCardProps.labels for slugs.
products?
optionalproducts?: (Product|Cluster)[]
Defined in: components/ProductGrid.tsx:48
Pre-fetched products/clusters to display. When provided the component skips internal API calls entirely. Pass an empty array (not undefined) to show the empty state while the parent controls loading.
renderClusterCard?
optionalrenderClusterCard?: (cluster) =>any
Defined in: components/ProductGrid.tsx:105
Provide a custom cluster card renderer.
Falls back to the built-in <ClusterCard> when not set.
Parameters
cluster
Cluster
Returns
any
renderProductCard?
optionalrenderProductCard?: (product) =>any
Defined in: components/ProductGrid.tsx:99
Provide a custom product card renderer.
Falls back to the built-in <ProductCard> when not set.
Parameters
product
Product
Returns
any
showAvailability?
optionalshowAvailability?:boolean
Defined in: components/ProductGrid.tsx:194
- Show only the availability indicator inside the stock widget. * Forwarded to
ProductCard.showAvailability. * Defaults to true.
showModal?
optionalshowModal?:boolean
Defined in: components/ProductGrid.tsx:183
- When true, AddToCart shows a success modal instead of a toast. * Defaults to false.
showPrice?
optionalshowPrice?:boolean
Defined in: components/ProductGrid.tsx:195
- Show the price below the product name. * Defaults to true.
showStock?
optionalshowStock?:boolean
Defined in: components/ProductGrid.tsx:193
- Show the stock / availability widget on each product card. * Forwarded directly to
ProductCard.showStock. * Defaults to false.
sortField?
optionalsortField?:string
Defined in: components/ProductGrid.tsx:158
- Sort field to use (e.g. 'NAME', 'PRICE'). * When provided overrides internal sort state. * When changed the grid automatically re-fetches (page resets to 1).
sortOrder?
optionalsortOrder?:string
Defined in: components/ProductGrid.tsx:159
- Sort direction: 'ASC' or 'DESC'. * Only used when sortField is also provided. * When changed the grid automatically re-fetches (page resets to 1).
stockComponent?
optionalstockComponent?:ComponentType<StockComponentProps>
Defined in: components/ProductGrid.tsx:248
stockLabels?
optionalstockLabels?:Record<string,string>
Defined in: components/ProductGrid.tsx:196
- Label overrides forwarded to the embedded ItemStock component inside each card. * Keys: inStock, outOfStock, lowStock, available, notAvailable, pieces
stockValidation?
optionalstockValidation?:boolean
Defined in: components/ProductGrid.tsx:122
- Enables stock validation inside AddToCart. * Blocks add when requested quantity exceeds available stock. * Defaults to false.
taxZone?
optionaltaxZone?:string
Defined in: components/ProductGrid.tsx:56
Tax zone used for price calculation. Defaults to 'NL'.
term?
optionalterm?:string
Defined in: components/ProductGrid.tsx:70
Search term — passes term into categoryProductSearchInput and uses
config.baseCategoryId so the whole catalog is searched.
textFilters?
optionaltextFilters?:ProductTextFilterInput[]
Defined in: components/ProductGrid.tsx:127
- Active text filters to apply — built by the parent from FiltersSidebar *
onFilterChangecallbacks. Each entry maps to atextFiltersinput * row in the CategoryService query. * When this prop changes the grid automatically re-fetches (page resets to 1).
user?
optionaluser?:Contact|Customer|null
Defined in: components/ProductGrid.tsx:118
Authenticated user passed through to ProductCard / AddToCart.