Skip to main content

Code

Props

Props should be passed as attributes to the component element.
string
The path to the cart page.Defaults to /cart
string
The style of the icon to display.Can be one of cart-outline, cart-solid, bag-outline, or bag-solid.Defaults to the Cart icon setting on the Cart tab, which starts as bag-outline
boolean
Whether to show the number of items beside the icon.Defaults to the Show the item count setting on the Cart tab
number
The size of the icon, in pixels.Defaults to 20

Styling

The following parts are available to style the cart icon component:
string
The <a> element that contains the icon and cart count.
string
The icon itself.
string
The item count.