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.
How to make one
- 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.
- Select what should show or hide. Under Show it, choose When a switch is set…, pick the switch, and the value it waits for.
- 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.