thegeneralyst/AnopaDocs
Cart

Cart Toggle

Cart counter that also acts as a click trigger for the cart modal and listens for the toggleCartModal event.

Cart

AP_CartToggle combines a live cart counter with a click trigger for the cart modal. It displays the current number of items in the cart and, when clicked, fires the Framer interaction connected to the triggerCartModal event handler. It also listens for the toggleCartModal event dispatched by other components — such as AP_AddToCartButton — so the cart can be opened from anywhere on the page without prop drilling. The component supports the same canvas preview and hide-when-zero options as AP_CartCounter, and exposes full border, padding, and font styling directly from the panel.

Property Controls

ControlTypeDefaultDescription

triggerCartModal

EventHandler

Framer event handler that opens the cart modal. Connect this to your cart drawer open interaction.

Font

Font

14px / 1.4em

Typography for the count number displayed in the toggle.

Text Color

Color

#ffffff

Color of the cart count text.

Padding

Padding

Padding around the count inside the toggle element.

Border

Border

1px solid rgba(0,0,0,0.5)

Border style applied to the toggle element.

Border Radius

BorderRadius

Corner radius of the toggle element.

Canvas Preview

Number

0

Static count shown on the canvas for design purposes. Has no effect at runtime.

Canvas: Live Count

Boolean

false

When on, shows the actual live cart count on the canvas instead of the preview value.

Hide When 0 (runtime)

Boolean

false

When on, the component renders nothing at runtime when the cart is empty.