Developers
Start building
Themes/Theme SDK/Modules/listing/Types: ProductGridProps to ListingEmptyProps

Types: ProductGridProps to ListingEmptyProps

The types of @poltura/theme-sdk/listing, ProductGridProps to ListingEmptyProps.

On this page
import { … } from '@poltura/theme-sdk/listing';

ProductGridProps

Props of ProductGrid.

cardsrequiredreadonly ProductCardView[]

The cards to show, in order.

layoutProductCardLayout

Grid tiles or list rows; defaults to `grid`.

columns{ readonly desktop: number; readonly mobile: number; }

Cards per row on wide and narrow screens; defaults to four and two.

showPartial<ProductCardVisibility>

Card parts to switch off.

imageAspectRatiostring

The card image's CSS aspect ratio.

labelsProductCardLabels

The cards' button texts.

empty{ readonly heading?: string; readonly body?: string; }

The heading and text shown when there are no cards.

loadingboolean

Shows a page of placeholders instead of the cards.

classNamestring

Classes added to the grid.

listNamestring

The list's name in the store's analytics, such as a rail's heading; unset keeps the enclosing list's.

ProductListProps

Props of ProductList.

cardsrequiredreadonly ProductCardView[]

The cards inside, in the order they show.

childrenReactNode

The cards in your own layout.

namestring

The list's name in the store's analytics, such as a rail's heading; unset keeps the enclosing list's, or the search results.

ProductRailClassKey

The parts of ProductRail its classes prop styles.

type ProductRailClassKey = 'header' | 'grid'

ProductRailProps

Props of ProductRail.

cardsrequiredreadonly ProductCardView[]

The cards to show, in order.

titlestring

The rail's heading.

subtitlestring

A line under the heading.

viewAllHrefstring

Where "view all" leads; defaults to the catalogue.

layout'grid' | 'carousel'

A grid, or one scrolling row; defaults to `grid`.

perViewnumber

Cards visible at once in a scrolling row, 3 to 6; defaults to 5.

mobileArrowsboolean

Shows the row's arrows on narrow screens too when it holds more than two cards.

arrowPlacement'edges' | 'topRight'

Arrows over the row's sides, or together above its right end; defaults to `edges`.

mobileViewAllboolean

Shows a full-width "view all" button under the cards on narrow screens; defaults to true.

classNamestring

Classes added to the section.

classesPartial<Record<ProductRailClassKey, string>>

Classes added to the heading row and the grid.

iconReactNode

Drawn before the heading; a star when unset.

ListingHeaderProps

Props of ListingHeader.

headerrequiredListingState['header']

The heading, as {@link useListing} hands it.

sortReactNode

A control shown beside the heading on wide screens, such as {@link SortSelect}.

onClearSearch() => void

Called by the "clear search" button of a results page; without it the button is not shown.

clearSearchLabelstring

The "clear search" button's text; defaults to the store's wording.

busyboolean

Disables the button while the list reloads.

classNamestring

Classes added to the heading row.

ListingEmptyProps

Props of ListingEmpty.

headingstring

The heading; defaults to the store's "no products" wording.

bodystring

The text under it.

classNamestring

Classes added to the block.

Last updated