<hx-search-assistance>
v0.6.0+
HelixUI v0.6.0 or later required
The custom <hx-search-assistance> element contains a list of choices
for the user, such as recent or suggested searches depending on their context.
Attributes
Attributes enable declarative configuration of an element, via HTML markup.
- open (optional)
- Opens the search assistance
- position (optional)
- Positions the search assistance
- relative-to (optional)
- ID of an element that the search assistance is positioned relative to.
Properties
JavaScript properties enable programmatic access to an element's configuration and state.
-
controlElement {HTMLElement}
read-only -
Returns the first HTML element whose
aria-controlsattribute matches the ID of the<hx-search-assistance>.The control element is used to attach various DOM event listeners, in order to determine when to show or hide the
<hx-search-assistance>. - open {Boolean [false]}
-
Indicates whether or not the
<hx-search-assistance>should be displayed. - optimumPosition {String|undefined}
-
Optimum position determined by internal positioning algorithm.
It will return undefined if
<hx-search-assistance>hasn't been repositioned. - position {String [bottom-start]}
-
Configures the position of the
<hx-search-assistance>, in relation to its relative element.Reflects the positionattribute. -
relativeElement {HTMLElement}
read-only -
HTML element used as a point of reference for calculating the fixed position of the
<hx-search-assistance>.If the
relative-toattribute is defined, this will return the first element whose ID matches therelativeToproperty. Otherwise, it will return the value ofcontrolElement. - relativeTo {String}
-
A string corresponding to the ID of the relative element.
Reflects the relative-toattribute.