> ## 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-image-upload

> Web-Komponente msm-image-upload.

`msm-image-upload` ist eine Web-Komponente (Lit).

## Zweck

Darstellung von Medien (Bilder/Video).

## Beispiel

```html theme={null}
<msm-image-upload></msm-image-upload>
```

## Attribute / Properties

| Name       | Typ     | Standard                                  | Hinweise |
| ---------- | ------- | ----------------------------------------- | -------- |
| `variant`  | string  | `UploadType.fromValue(this.variant).name` |          |
| `command`  | string  | -                                         |          |
| `cdn-root` | string  | `""`                                      |          |
| `path`     | string  | `""`                                      |          |
| `src`      | string  | -                                         |          |
| `required` | boolean | -                                         |          |

## Events

| Event              | detail     | Wann |
| ------------------ | ---------- | ---- |
| `msm-image-upload` | `imageUrl` |      |
| `msm-image-remove` | `imageUrl` |      |

### Beispiel

```html theme={null}
<msm-image-upload>
</msm-image-upload>

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

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

</script>
```

## CSS parts

* `base`

## Slots

Keine Slots dokumentiert.

## Methoden

* `validate()`

## Hinweise

* Custom events bubble.
