Switchable content
To add larger pieces of switchable content to the page, use switcher-key
tag. This is an alternative to Tabs.
For example, if a feature's description is different for Windows and macOS, you need to provide it for each platform individually in the topic, or if in general documentation is the same, but you need to provide examples in different languages or frameworks.
Create switchable content
Add the
switcher-key
attribute to the elements that should appear when the user selects a certain switcher on top of the page.(Optional) Add the
switcher-label
attribute to thetopic
tag in XML or use front matter in Markdown if there is an entity that sections describe. For example, operating system, programming language, technology and so on.
Use the switcher at the top of the page to switch chapters in the example below:
