Represents a banner.
Class constructor.
| parameter | type | default | description |
|---|---|---|---|
| bannerElement (optional) | HTMLElement | The banner element in the DOM | |
| options (optional) | Object | {} | An options object for configuring the banner |
Build a full banner element. This is used when no banner or a partial banner exists in the DOM.
| parameter | type | default | description |
|---|---|---|---|
| bannerElement (optional) | HTMLElement | The banner element to build around |
Build a close button element.
Get the data attributes from the bannerElement. If the banner is being set up declaratively, this method is used to extract the data attributes from the DOM.
| parameter | type | default | description |
|---|---|---|---|
| bannerElement | HTMLElement | The banner element in the DOM |
Initialise banner components.
| parameter | type | default | description |
|---|---|---|---|
| rootElement | HTMLElement | String | The root element to intialise banners in, or a CSS selector for the root element | |
| options (optional) | Object | {} | An options object for configuring the banners |
Represents a banner.
Class constructor.
| parameter | type | default | description |
|---|---|---|---|
| bannerElement (optional) | HTMLElement | The banner element in the DOM | |
| options (optional) | Object | {} | An options object for configuring the banner |
If using the Build Service, add o-banner@^4.0.0-beta.0 to your
script and link tags.
If running a Manual Build, run npm install "o-banner@^4.0.0-beta.0".
o-banner is maintained directly by the Origami team. If you have any questions about o-banner or Origami in general, we are happy to help. 😊
Slack: #origami-support
Email: origami.support@ft.com
To report a bug or request features please create an issue on Github. For support or general feedback please get in touch 😊
Slack: #origami-support
Email: origami.support@ft.com