Modern web component integration for the campaigns carousel. See the Widgets Docs Index for theming and embed attributes.
Add this script tag to your HTML head or before the closing body tag:
Add the web component anywhere in your HTML:
| Attribute | Type | Default | Description |
|---|---|---|---|
max-campaigns
|
number | 5 | Maximum number of campaigns to display (1-10) |
theme
|
string | light | Widget theme: "light" or "dark" |
height
|
number | 280 | Widget height in pixels (200-500) |
show-expiration
|
boolean | true | Show campaign expiration dates |
base-url
|
string | auto | Base URL for campaign links |
api-key
|
string | - | Optional API key for authenticated requests |
This web component works in all modern browsers that support Custom Elements:
For older browsers, a polyfill will be automatically loaded.