Origami Frontend Components & Services

JSDoc: o-message active

new Message(messageElement, options)

Class constructor.

parameter type default description
messageElement (optional) HTMLElement The message element in the DOM
options (optional) Object {} An options object for configuring the message

Methods

Links

module.exports.message

Static Method

Build a full message element. Used when there is no message element in the DOM.

Returns

  • HTMLElement - Returns the new message element

Links

module.exports.closeButton

Static Method

Build a close button

Returns

  • HTMLElement - Returns a new element to close the message

Links

Message#render

Instance Method

Render the message.

Links

Message#open

Instance Method

Open the message.

Links

Message#close

Instance Method

Close the message.

Links

Message.getDataAttributes(messageElement)

Static Method

Get the data attributes from the messageElement. If the message is being set up declaratively, this method is used to extract the data attributes from the DOM.

parameter type default description
messageElement HTMLElement The message element in the DOM

Links

Message.init(rootElement, options)

Static Method

Initialise message component.

parameter type default description
rootElement HTMLElement | String The root element to intialise a message 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-message

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

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

Help & Support

o-message is maintained directly by the Origami team. If you have any questions about o-message 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