WordPress
patterns/tabs-1-static.php
✔ Core
✔ Custom
- Use: switching between a few comparable blocks of text inside a page, when it is acceptable that a tab out of view on small screens may be overlooked.
- Not when there are many tabs and every option matters, which belongs in Tabs 2, and not for content that has to be visible or printable all at once.
- Source: entered by hand in the editor.
- Content: 2 to 5 tabs, each a short label and body text. Give the tab list a label, and each panel an HTML anchor if the open tab should be linkable.
patterns/tabs-2-static.php
✔ Custom
- Use: switching between blocks of text inside a page when there are many tabs and every option matters, so all labels stay visible on small screens.
- Not for a few tabs where overlooking one is acceptable, and not for content that has to be visible or printable all at once.
- Source: entered by hand in the editor.
- Content: 5 or more tabs, each a label and body text. Give the tab list a label, and each panel an HTML anchor if the open tab should be linkable.
Figma
Docs
- Use these tabs like a toc (table of contents) for a page. If tabs link to different URLs, issues with duplicate elements above the tabs (f.e.
<h1>) can quickly arise.
