Embeddable vanilla JS widget for QueueZero viral waitlists
npm install @queuezero/embedEmbeddable vanilla JS widget for QueueZero viral waitlists. No build step required.
``html`
`bash`
npm install @queuezero/embed
`js
import * as QueueZero from '@queuezero/embed';
QueueZero.init('queuezero-waitlist', 'your-campaign-slug', {
apiUrl: 'https://api.queuezero.io'
});
`
Mounts a complete waitlist widget (form + status + referral share) to the specified element.
| Parameter | Type | Description |
|-----------|------|-------------|
| elementId | string \| null | ID of the container element, or null for headless mode |campaignSlug
| | string | Your campaign identifier |options.apiUrl
| | string | API endpoint URL |options.displayMode
| | 'inline' \| 'modal' | Display as inline form or modal (default: 'inline') |options.modalOptions
| | object | Modal configuration (only when displayMode: 'modal') |options.modalOptions.triggerText
| | string | Button text (default: 'Join Waitlist') |options.modalOptions.triggerText
| | string | Button text (default: 'Join Waitlist') |options.modalOptions.attachToText
| | string | Automatically attach modal to buttons with this text |options.modalOptions.size
| | 'sm' \| 'md' \| 'lg' | Modal width (default: 'md') |
`html`
The modal automatically uses your campaign's branding (logo, cover image, theme color) from the API.
The widget uses qz-* class names for styling:
`css``
.qz-embed-container { }
.qz-form { }
.qz-form-input { }
.qz-form-button { }
.qz-status { }
.qz-share { }
MIT