> ## 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.

# تطبيق Mellowtel Elements في المواقع

هنا تشوف كيفاش تدمج Mellowtel Elements في موقعك باستخدام حزمة NPM أو CDN للإعداد السريع.

## الخيار 1: حزمة NPM

### التثبيت

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

### التطبيق

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

// بّدأ مع معرف الامتداد ديالك ومفتاح التكوين
const mellowtel = new MellowtelElements('your-extension-id', 'your-config-key');

// إنشاء العناصر
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' });
```

## الخيار 2: CDN

### إعداد HTML

```html theme={null}
<!DOCTYPE html>
<html>
<head>
    <title>MellowTel Elements Example</title>
</head>
<body>
    <!-- حاويات العناصر -->
    <div id="opt-in-container"></div>
    <div id="opt-out-container"></div>
    <div id="settings-container"></div>

    <!-- التحميل من CDN -->
    <script src="https://cdn.jsdelivr.net/npm/mellowtel-elements@latest/dist/index.global.js"></script>
    <script>
        // بّدأ MellowTel Elements
        const mellowtel = new window.MellowtelElements.default('your-extension-id', 'your-config-key');

        // إنشاء العناصر
        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>
```

هايل! دابا موقعك واجد باش يستعمل Mellowtel Elements للاشتراك، إلغاء الاشتراك، وتسيير الإعدادات بكل سهولة.
