By default, the state of all elements is toggled via the hidden
attribute, so it’s important to ensure that elements will be hidden when this attribute is present, for which we will set the following styles:
All components support the following option: stateMode
.
Mode | Hidden state selector | Description |
---|---|---|
'hidden' | [hidden] | Default mode, hides through display: none; |
'hidden-until-found' | [hidden="until-found"] | The element will show when a match is found in the site search. Read more |
'inert' | [inert] | Makes the element non-interactive, but remains visible |
'class-hidden' | .ui-hidden | The element remains fully interactive, adds the .ui-hidden class when hidden |
'class-shown' | - | The element remains fully interactive, adds the .ui-shown class when shown |
'remove' | - | The element is removed from the DOM. Add the hidden attribute to hide by default |
This mode is useful when you want to hide elements until they are found in the site search.
This mode is useful when the same element can have different purposes depending on the conditions.
Resize the screen to 550px to display the menu in a dialog