In the docs

Moving and reacting

Switches

A switch is a name with a value, like tab is delivery. Buttons set it; anything on the page can show only when it has a certain value. Tabs, front and back views, gift options and grid or list views are all switches.

Wrap it as a gift?
No, thanks
No, thanks
Yes, wrap it
Yes, wrap it
We'll wrap it in brown paper with a handwritten card. Tell us what to write at checkout.
Try it: click Yes, wrap it. Both buttons set the switch wrap; the note shows only when it's yes.

How to make one

  1. Select a button. In its Behaviour tab, set When clicked to Set a switch…, give the switch a name and the value this button sets.
  2. Select what should show or hide. Under Show it, choose When a switch is set…, pick the switch, and the value it waits for.
  3. Do the same for the other buttons and the parts they go with.

Good to know

is, isn't
A part can wait for a value, or show for anything but it.
Several switches
Give them different names: a tab switch and a view switch work side by side.
Showing which one is on
The button that's on is marked as pressed for screen readers. To show it to everyone, put two versions of the button and have each wait for the switch, as in the example.
Shared on the page
A switch belongs to the page: any part anywhere on it can wait for it.

The Tabs recipe is switches from start to finish.

Recipes that use it