Fejlesztőknek
Kezdj bele
Témák/Theme SDK/Modules/listing

listing

Ez az oldal még csak angolul érhető el.

Collection, category and search listings: product cards, filters, sort and paging.

Ezen az oldalon
import { … } from '@poltura/theme-sdk/listing';

Hooks

NameWhat it is
useListingFiltersThe filters of the product list the component sits in: its groups, the shopper's selection and the actions that change it.
useListingThe product list the component sits in: its heading, the cards of the current page, the sort, the paging and the merchant's grid choices.

Parts

NameWhat it is
FilterOptionOne checkbox choice with its match count, and a disclosure for its nested choices such as subcategories.
SwatchFilterA swatch group's choices as colour or picture dots with their names, with search and "show more" for long lists.
PriceRangeFilterA price group's range as a slider, two amount fields or both, as the merchant chose, with a reset.
FilterGroupOne filter group as a collapsible section: its title and selection count, then its checklist, swatches, price range or toggle.
AppliedFiltersThe applied filters as removable chips, with a "clear all" link; nothing while no filter is applied.
FilterSheetThe narrow-screen filters: a button with the selected count that opens FilterPanel in a sheet with "clear all" and "show results".
SortSelectThe sort menu: a button naming the current order that opens the list of orders.
ListingPaginationPrevious and next buttons around the first, last and nearby page numbers; nothing for a single page.
ProductCardSkeletonA grey placeholder in the shape of a product card, for lists that are still loading.
ProductCardBadgeThe merchant's card badge, the first specification the store shows on cards; nothing without one.
ProductCardSpecsThe attribute values the store shows on cards, such as a game's platform, as small chips with their icons and "+N" for the rest; nothing without any.
ProductListReports the cards inside as one product list to the store's analytics: the list once it shows, and the card a shopper opens.
ListingHeaderA listing's title, product count and description, with a "clear search" button on a results page.
ListingEmptyThe block a listing shows when nothing matches: an icon, a heading and a line of text.

Defaults

NameWhat it is
FilterPanelThe complete filter panel of the product list it sits in: every group of useListingFilters with a "clear all".
ProductCardA complete product card: image, discount, title, badges, price and an add-to-cart button that opens the product page when options must be chosen.
ProductGridA responsive grid of product cards, with placeholders while loading and ListingEmpty when there are none.
ProductRailA titled row of product cards with a "view all" link, as a grid or a scrolling row with arrows; nothing without cards.

Constants

NameWhat it is
collectionRegionsThe collection template's regions, where merchants place the listing's blocks.

Types

NameWhat it is
AppliedFilterOne applied filter, as a removable chip.
FilterGroupKindHow a filter group is presented: a checklist, colour swatches, a price range or an on/off toggle.
FilterGroupViewOne filter of a product list, such as brand, colour or price.
FilterOptionViewOne choice inside a filter group.
FilterPriceDisplayHow a price group takes its range: a slider, two amount fields, or both.
ListingFilterSelectionThe filters a product list is narrowed by.
ListingFiltersStateThe filter panel's state and the actions that change the selection.
ListingStateA collection, category or search results page with its products, sort and paging.
ListingVisibilityWhich parts of a product list the merchant has switched on.
PaginationWhere a paged list is and how to reach its other pages.
PriceRangeSelectionA price range a shopper selected, in major units; a null bound leaves that side open.
SortOptionOne choice of the sort menu.
ProductCardA product as a list, rail or search result shows it.
FilterOptionPropsProps of FilterOption.
SwatchFilterPropsProps of SwatchFilter.
PriceRangeFilterPropsProps of PriceRangeFilter.
FilterGroupPropsProps of FilterGroup.
AppliedFiltersClassKeyThe parts of AppliedFilters its classes prop styles.
AppliedFiltersPropsProps of AppliedFilters.
FilterPanelPropsProps of FilterPanel.
FilterSheetPropsProps of FilterSheet.
SortSelectPropsProps of SortSelect.
ListingPaginationPropsProps of ListingPagination.
ProductCardLayoutWhether a card is a tile in a grid or a wide row in a list.
ProductCardVisibilityWhich parts of a product card are shown; every part is on unless switched off.
ProductCardLabelsThe button texts of a product card; each falls back to the store's own wording.
ProductCardPropsProps of ProductCard.
ProductCardSkeletonPropsProps of ProductCardSkeleton.
ProductCardBadgePropsProps of ProductCardBadge.
ProductCardSpecsPropsProps of ProductCardSpecs.
ProductGridPropsProps of ProductGrid.
ProductListPropsProps of ProductList.
ProductRailClassKeyThe parts of ProductRail its classes prop styles.
ProductRailPropsProps of ProductRail.
ListingHeaderPropsProps of ListingHeader.
ListingEmptyPropsProps of ListingEmpty.
Utoljára frissítve