thegeneralyst/AnopaDocs
Cart

Cart Toggle

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

What it does

APCartToggle is a cart counter variant that also acts as a click trigger for the cart modal. Unlike APCartCounter which is display-only, APCartToggle accepts a Framer EventHandler prop that triggers the cart open/close interaction. It also listens for the toggleCartModalAddToCartButton and AP_BuyNowButton can open the cart automatically after an add.

How to set it up

Place APCartToggle in your navigation or any global header area. Connect its triggerCartModalAddToCartButton and AP_BuyNowButton will automatically fire the toggleCartModal event when they add to cart, opening the cart drawer without any extra wiring.

Property Controls

ControlTypeDefaultDescription
triggerCartModalEventHandlerFramer interaction triggered on click and when the `toggleCartModal` document event is received.
FontTypography settings for the cart count text.