Skip to main content

<hx-disclosure> v0.2.0+ HelixUI v0.2.0 or later required

The custom <hx-disclosure> element provides behavior required to toggle content visibility of a companion <hx-reveal> element.

Target Element

A target element should adhere to the following contract:

  1. It should have an id attribute.
  2. It should respond to an open property that reflects to an open attribute.


Simulates a mouse click on the element


Attributes enable declarative configuration of an element, via HTML markup.

The ID of a target element to associate behavior. Required to wire up display functionality between elements.
Automatically initialized to the same state as the target element. When attribute is updated, target element is updated as well.
Automatically set to "button", unless explicitly defined in markup.
Automatically set to "0", unless explicitly defined in markup.


JavaScript properties enable programmatic access to an element's configuration and state.

expanded {Boolean}
Mirrors the aria-expanded attribute.
  • Set to true to expand the target element.
  • Set to false to collapse the target element.

See Also