The MiniCart container displays a summary of the shopper’s shopping cart. It shows a list of products currently in the cart and subtotal amounts. It also provides call-to-action buttons for proceeding to checkout or updating the cart.
MiniCart container
Configurations
The MiniCart container provides the following configuration options:
children
VNode[]
No
The child elements to be rendered inside the mini cart.
initialData
CartModel | null
No
The initial data for the mini cart. Defaults to null.
hideFooter
boolean
No
Flag to hide the footer in the mini cart. Defaults to true.
slots
{ ProductList?: SlotProps }
No
Slot props for customizing the product list display.
routeProduct
function
No
Function to generate the URL for a product.
routeCart
function
No
Function to generate the URL for the cart page.
routeCheckout
function
No
Function to generate the URL for the checkout page.
routeEmptyCartCTA
function
No
Function to generate the URL for the empty cart call-to-action.
displayAllItems
boolean
No
Flag to show all items.
showDiscount
boolean
No
Flag to show discounts in the mini cart.
showSavings
boolean
No
Flag to show savings in the mini cart.
The CartModel object has the following shape:
Supported slots
The MiniCart container supports the ProductList slot.
Example configuration
The following example demonstrates how to render the MiniCart container: