Origami Frontend Components & Services

JSDoc: o-banner

Banner#render

Instance Method

Render the banner.

Links

Banner#open

Instance Method

Open the banner.

Links

Banner#close

Instance Method

Close the banner.

Links

Banner#buildBannerElement(bannerElement)

Instance Method

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

Returns

  • HTMLElement - Returns the new banner element

Links

Banner#buildCloseButtonElement

Instance Method

Build a close button element.

Returns

  • HTMLElement - Returns the new close button element

Links

Banner.getOptionsFromDom(bannerElement)

Static Method

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

Links

Banner.init(rootElement, options)

Static Method

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

Links

Switch component view

GitHub Repository

Install o-banner

If using the Build Service, add o-banner@^2.3.0 to your script and link tags.

If running a Manual Build, run bower install --save "o-banner@^2.3.0".

Help & Support

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: #ft-origami
Email: origami.support@ft.com

Feedback / Issues

To report a bug or request features please create an issue on Github. For support or general feedback please get in touch 😊

Slack: #ft-origami
Email: origami.support@ft.com