Skip to main content

<hx-alert> v0.6.0+ HelixUI v0.6.0 or later required

The custom <hx-alert> element provides a user with an "at a glance" status of a given content section.

Methods

dismiss()
Dismiss the alert (removes element from the DOM).
submit()
Simulates a mouse click on the CTA.

Attributes

Attributes allow you to configure an element in a declarative manner via markup.

cta {String} (optional)
Set the text of the CTA button. If absent or blank, the CTA button will not be displayed.
static {Boolean} (optional)
When present, alert will not be dismissable.
status {String} (optional)
Sets the status text at the beginning of the alert description. If absent or blank, the status element will not be displayed.
type {Enum<String>} (optional)
Identifies the type of alert. Valid values are as follows:
  • info
  • error
  • success
  • warning

Properties

Properties allow you to configure an element in an imperative manner via JavaScript.

cta {String}
Manipulates the cta attribute.
static {Boolean}
When true, alert will not be dismissable.
status {String}
Manipulates the status attribute.
type {String}
Manipulates the type attribute.

See Also