> ## Documentation Index
> Fetch the complete documentation index at: https://docs.framerfy.ae/llms.txt
> Use this file to discover all available pages before exploring further.

# Clear Cart Button

<Frame>
  <img src="https://mintcdn.com/thedesignmvp/p8ianJK_HoVoQNmF/images/ClearCartButton.png?fit=max&auto=format&n=p8ianJK_HoVoQNmF&q=85&s=eb5bef59a8e22bc6aa4485f63fd5a296" alt="Clear Cart Button" width="1280" height="720" data-path="images/ClearCartButton.png" />
</Frame>

A cart-clearing wrapper component for Framer that removes all items from the cart when clicked and notifies all other cart components to update.

***

## What It Does

The **Clear Cart Button** wraps any Framer component and makes it completely empty the cart on click. It has no visual style of its own — the appearance is entirely defined by the component placed inside it.

Key behaviors at a glance:

* **Clears the entire cart** — removes the `cart` key from `localStorage` entirely on click.
* **Notifies other components** — dispatches a `cartUpdated` event on `window` after clearing, so the Cart Item Counter, Cart State Controller, Cart Product List, and Cart Total Price all update instantly.
* **Accepts any child element** — wraps whatever Framer component or design element you place inside it, so the visual design is completely up to you.

## Property Controls

| Property                                              | Type               | Description                                                                          |
| :---------------------------------------------------- | :----------------- | :----------------------------------------------------------------------------------- |
| **Custom button or element that triggers clear cart** | Component Instance | The Framer component shown as the button. Any click on this element clears the cart. |

## Notes

* This action is **irreversible** — there is no confirmation step or undo. The entire cart is deleted immediately on click.
* After clearing, a `cartUpdated` event is dispatched on `window`, keeping all cart components in sync automatically.
* The wrapper has a minimum size of `20×20px` to ensure it remains clickable even if the child component renders at zero size.
