thegeneralyst/AnopaDocs
Cart

Cart Counter

Displays the live number of items in the cart, with optional prefix and suffix text.

What it does

AP_CartCounter displays the live number of items in the cart. It derives the count directly from the cart store's items array, summing quantities, so it always stays in sync regardless of how items are added or removed.

How to set it up

Drop this anywhere in your layout — typically in the navigation bar next to a cart icon. Style it using the Font and Text Color controls. No product ID or slot connection is needed.

Property Controls

ControlTypeDefaultDescription
FontFont14pxTypography for the displayed number and optional prefix/suffix text.
Text ColorColor#ffffffColor of the counter text.
PrefixStringText shown before the count (e.g. "Cart (").
Text shown after the count (e.g. " items)").
GapNumber0pxSpacing between prefix, number, and suffix.