Storefront SDK components and hooks
This is the inventory of the React and Vue UI libraries: every component and headless hook they export, grouped by domain. For how the libraries fit together and how to wire them up, see the Storefront SDK guides. Every React component below links to its props, and every hook links to its options and return type, on the package documentation sites. The TypeScript types in your editor show the same and always match the version you installed.
The React and Vue libraries expose the same components and the same hooks (composables in Vue), so the inventory below applies to both unless noted.
Packages
| Library | Package | Version |
|---|---|---|
| React | @propeller-commerce/propeller-v2-react-ui | 0.19 |
| Vue | @propeller-commerce/propeller-v2-vue-ui | 0.18 |
Both build on propeller-v2-core-ui and propeller-sdk-v2. See Understanding the Storefront SDK for the full package set.
How to use them
Install the library and the SDK, mount the providers once at your app root, then render any component or call any hook inside them. Components read the SDK services and the session from context. See UI components for the provider setup and entry points, and SDK services for the data layer.
Components
Catalog and product
ProductGrid: paginated product grid for a category or search resultProductCard: single product card with image, price and add-to-cart; supports a compound APIClusterCard: card for a configurable product (cluster)ProductInfo: product detail block (name, SKU, price, actions)ProductPrice: formatted, tax-aware priceProductBulkPrices: quantity-break price tableProductGallery: product image galleryProductVideos: embedded product videosProductDownloads: downloadable product documentsProductSpecifications: attribute and specification tableProductDescription: long product descriptionProductShortDescription: short product descriptionProductTabs: tabbed description, specifications and downloadsProductSlider: cross-sell and up-sell sliderProductBundles: product bundle compositionItemStock: stock and availability indicatorPriceToggle: tax-inclusive or tax-exclusive price toggleDeliveryDate: delivery date selection
Clusters
ClusterConfigurator: variant and option selection for a clusterClusterInfo: cluster detail blockClusterOptions: add-on option groups
Machines and spare parts
MachineCard: card for a machine, a product that has orderable spare partsMachineGrid: paginated grid of machines, the machine equivalent ofProductGrid
Grid and navigation
GridToolbar: sort and layout controls for a gridGridFilters: faceted product filtersGridPagination: pagination controlGridTitle: grid heading with result countBreadcrumbs: category breadcrumb trailMenu: category navigation menuSearchBar: product search inputCategoryDescription: category long descriptionCategoryShortDescription: category short description
Cart and checkout
AddToCart: add-to-cart control with quantityCartIconAndSidebar: cart icon and slide-in sidebarCartItem: single cart line itemCartOverview: full cart contentsCartSummary: totals summaryCartCarriers: shipping method selectionCartPaymethods: payment method selectionActionCode: promotion or action code inputQuickOrder: quick order form, adds many lines to the cart by product code and quantity, with typeahead and file uploadItemsOverview: line-item list for a cart or orderCartBonusItems: promotional bonus items in the cart
Orders and quotes
OrderList: order history list with filtersOrderActions: actions on an order, such as reorderOrderItemCard: single order lineOrderSummary: order summaryOrderTotals: order totalsOrderShipments: shipment and tracking informationOrderBonusItems: bonus items on an orderQuoteActions: actions on a quote (B2B)
Account, authentication and B2B
LoginForm: sign-in formRegisterForm: registration form (Contact, Customer or both, by shop mode)ForgotPassword: password recoveryUserDetails: account profile detailsAccountIconAndMenu: account icon with dropdown menuAddressCard: a single addressAddressSelector: choose a delivery or invoice addressCompanySwitcher: switch the active Company (B2B)AddToFavorite: add a product to a favorite listFavoriteLists: favorite lists overviewFavoriteListItem: a single favorite list entryFavoriteListDetails: items in a favorite listPurchaseAuthorizationConfigurator: configure purchase-authorization rules (B2B)PurchaseAuthorizationRequests: review and act on authorization requests (B2B)LoginToOrderButton: prompts a visitor to sign in before ordering, in portal modes that hide ordering until login
Structured data
ProductJsonLd,ClusterJsonLd,ItemListJsonLd: schema.org JSON-LD output for SEO. In React import them from@propeller-commerce/propeller-v2-react-ui/pure, in Vue from the package root
Hooks and composables
Headless: they hold state and call the API but render nothing. Use them to build your own UI or to drive the components above. Hooks in React, composables in Vue, with the same names.
| Hook | Purpose | Options and return type |
|---|---|---|
useAuth | Login, registration and forgot-password flows | React · Vue |
useCart | Cart resolution, line items and action codes | React · Vue |
useCheckout | Carriers, payment methods and placing an order | React · Vue |
useCompany | Company switching and company data (B2B) | React · Vue |
useAddress | Address create, read, update and delete | React · Vue |
useOrders | Order history search and detail | React · Vue |
useFavorites | Favorite lists and list items | React · Vue |
useMenu | Category navigation tree | React · Vue |
useProductInfo | Single-product detail data | React · Vue |
useProductSearch | Catalog search and filtering | React · Vue |
useProductSlider | Cross-sell and up-sell sliders | React · Vue |
useProductSpecs | Product attribute groups for spec tables | React · Vue |
useProductBundles | Product bundle composition | React · Vue |
useMachines | Machines listing (a machine is a product with orderable spare parts) | React · Vue |
useSpareParts | A machine's spare parts and child machines | React · Vue |
useClusterConfigurator | Cluster selection state | React · Vue |
usePurchaseAuthorizationConfigurator | Configure purchase authorization rules (B2B) | React |
usePurchaseAuthorizationRequests | Review and act on purchase authorization requests (B2B) | React |
useQuickOrder | Quick order rows, product typeahead and bulk add to cart | React · Vue |
useServices | Read the SDK services bundle from the provider | React · Vue |
Finding props and options
- React components. Each name above links to its
*Propstype on the React documentation site. - Hooks and composables. The table above links each one to its
Use*OptionsandUse*Returntypes, for React and for Vue. - Vue components. The Vue documentation site covers the composables but not the component props. For those, read the types that ship with the package: your editor shows them inline.
Whatever you read online, the types that ship with the package are the ones that match the version you installed.
This inventory was written against propeller-v2-react-ui 0.19.2 and propeller-v2-vue-ui 0.18.2.