> ## 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-компонент msm-add-to-cart.

`msm-add-to-cart` — web-компонент на Lit.

## Назначение

Отображение и взаимодействие с корзиной.

## Пример

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

## Атрибуты / свойства

| Имя                     | Тип    | По умолчанию | Примечания |
| ----------------------- | ------ | ------------ | ---------- |
| `seller-sku-id`         | string | -            |            |
| `discount-price-id`     | string | -            |            |
| `theme`                 | string | -            |            |
| `add-to-cart-icon`      | string | -            |            |
| `remove-from-cart-icon` | string | -            |            |

## События

| Событие                | detail | Когда |
| ---------------------- | ------ | ----- |
| `msm-add-to-cart`      | -      |       |
| `msm-remove-from-cart` | -      |       |

### Пример

```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`

## Слоты

Документированных слотов нет.

## Методы

Публичные методы не документированы.
