npm install mellowtel-elements
<!-- In popup.html or options page --> <div id="opt-in-container"></div> <div id="opt-out-container"></div> <div id="settings-container"></div>
import { MellowtelElements } from 'mellowtel-elements'; // Create instance with extension ID and config key const mellowtel = new MellowtelElements( 'your-extension-id-here', // Extension ID 'your-config-key-here' // Configuration key );
// Create opt-in element await mellowtel.createElement('opt-in-container', { type: 'opt-in' }); // Create opt-out element await mellowtel.createElement('opt-out-container', { type: 'opt-out' }); // Create settings element await mellowtel.createElement('settings-container', { type: 'settings' });