Hide and show components with toggles
Open and close menus, answers and panels with a toggle action and an open state.
Toggles open and close parts of a section: a mobile menu behind a hamburger button, an FAQ answer under its question, or a panel with more details. No code needed.
Set up a toggle
-
1Select the button that should open and close something, and give it the Toggle open action. It toggles an open state for the whole section.
-
2Select the component that should appear, and set its display to hidden.
-
3Add an open variant to the same component and set its display to flex.
-
4Preview and click the button: the component shows and hides.
Any component in the section can have an open variant, so one button can change several things at once, like rotating an arrow icon while the answer opens.