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

# msm-add-to-cart

> Web-Komponente msm-add-to-cart.

`msm-add-to-cart` ist eine Web-Komponente (Lit).

## Zweck

Anzeige und Interaktion mit dem Warenkorb.

## Beispiel

```html theme={null}
<msm-add-to-cart></msm-add-to-cart>
```

## Attribute / Properties

| Name                    | Typ    | Standard | Hinweise |
| ----------------------- | ------ | -------- | -------- |
| `seller-sku-id`         | string | -        |          |
| `discount-price-id`     | string | -        |          |
| `theme`                 | string | -        |          |
| `add-to-cart-icon`      | string | -        |          |
| `remove-from-cart-icon` | string | -        |          |

## Events

| Event                  | detail | Wann |
| ---------------------- | ------ | ---- |
| `msm-add-to-cart`      | -      |      |
| `msm-remove-from-cart` | -      |      |

### Beispiel

```html theme={null}
<msm-add-to-cart>
</msm-add-to-cart>

<script>
  const el = document.querySelector("msm-add-to-cart");
  el.addEventListener("msm-add-to-cart", (e) => {
    console.log(e.detail);
  });

  el.addEventListener("msm-remove-from-cart", (e) => {
    console.log(e.detail);
  });

</script>
```

## CSS parts

* `base`

## Slots

Keine Slots dokumentiert.

## Methoden

Keine öffentlichen Methoden dokumentiert.
