Widget
HTML / Vanilla JS
Add the Lumifeed widget to any HTML page with one line of code.
HTML / Vanilla JS
Script tag (recommended)
The simplest integration. Add this before your closing </body> tag:
<script
src="https://cdn.lumifeed.app/widget.js"
data-key="YOUR_API_KEY"
defer
></script>Configuration attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
data-key | string | — | Required. Your project API key |
data-position | string | bottom-right | Button position: bottom-right, bottom-left, top-right, top-left |
data-theme | string | auto | light, dark, or auto |
data-label | string | Feedback | Button label text |
data-primary-color | string | #7c6af4 | Brand accent color (hex) |
Example with options
<script
src="https://cdn.lumifeed.app/widget.js"
data-key="pk_live_abc123"
data-position="bottom-left"
data-theme="dark"
data-label="Give feedback"
data-primary-color="#0ea5e9"
defer
></script>JavaScript API
Once the script is loaded, use window.Lumifeed to control the widget:
// Open the widget programmatically
window.Lumifeed.open()
// Close the widget
window.Lumifeed.close()
// Identify the current user
window.Lumifeed.identify({
userId: "user_123",
name: "Ada Lovelace",
email: "ada@example.com",
})
// Listen for submission events
window.Lumifeed.on("submit", (feedback) => {
console.log("Feedback submitted:", feedback.id)
})