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

# Implementar Mellowtel Elements em Websites

Aqui você verá como integrar o Mellowtel Elements no seu site usando o pacote NPM ou CDN para uma configuração rápida.

## Opção 1: Pacote NPM

### Instalação

```bash theme={null}
npm install mellowtel-elements
```

### Implementação

```javascript theme={null}
import { MellowtelElements } from 'mellowtel-elements';

// Inicialize com seu ID de extensão e chave de configuração
const mellowtel = new MellowtelElements('your-extension-id', 'your-config-key');

// Crie elementos
await mellowtel.createElement('opt-in-container', { type: 'opt-in' });
await mellowtel.createElement('opt-out-container', { type: 'opt-out' });
await mellowtel.createElement('settings-container', { type: 'settings' });
```

## Opção 2: CDN

### Configuração HTML

```html theme={null}
<!DOCTYPE html>
<html>
<head>
    <title>Exemplo de MellowTel Elements</title>
</head>
<body>
    <!-- Divs de contêiner para os elementos -->
    <div id="opt-in-container"></div>
    <div id="opt-out-container"></div>
    <div id="settings-container"></div>

    <!-- Carregar do CDN -->
    <script src="https://cdn.jsdelivr.net/npm/mellowtel-elements@latest/dist/index.global.js"></script>
    <script>
        // Inicializar MellowTel Elements
        const mellowtel = new window.MellowtelElements.default('your-extension-id', 'your-config-key');

        // Crie elementos
        mellowtel.createElement('opt-in-container', { type: 'opt-in' });
        mellowtel.createElement('opt-out-container', { type: 'opt-out' });
        mellowtel.createElement('settings-container', { type: 'settings' });
    </script>
</body>
</html>
```

Perfeito! Agora seu site está pronto para usar o Mellowtel Elements para opt-in, opt-out e gerenciamento de configurações de forma integrada.
