SkunkworksDesign System
Explore the system
Components / 1.0

Related views. One context.

Switch between peer panels without losing the surrounding task.

Interactive example

Design for the task.

Use tabs for closely related views. Keep the selected state easy to identify.

Arrow keys, Home and End select and focus tabs. Tab moves from the active tab into its panel.

Code

<div data-tabs><div class="sk-tabs" role="tablist" aria-label="Resource view"><button id="usage-tab" role="tab" aria-selected="true" aria-controls="usage-panel" type="button">Usage</button><button id="code-tab" role="tab" aria-selected="false" aria-controls="code-panel" tabindex="-1" type="button">Implementation</button><button id="access-tab" role="tab" aria-selected="false" aria-controls="access-panel" tabindex="-1" type="button">Accessibility</button></div><div class="sk-panel" id="usage-panel" role="tabpanel" aria-labelledby="usage-tab" tabindex="0"><h3>Design for the task.</h3><p>Use tabs for closely related views. Keep the selected state easy to identify.</p></div><div class="sk-panel" id="code-panel" role="tabpanel" aria-labelledby="code-tab" tabindex="0" hidden><h3>Enhance native buttons.</h3><p>Load components.js to enable selection and keyboard navigation.</p></div><div class="sk-panel" id="access-panel" role="tabpanel" aria-labelledby="access-tab" tabindex="0" hidden><h3>Predictable keyboard behaviour.</h3><p>Use Left and Right arrows to switch tabs. Home and End select the first and last tabs.</p></div></div>

Usage

  • Use tabs for peer views; use links for separate destinations.
  • Keep labels short and avoid a large number of tabs.
  • Show one panel at a time and preserve each panel’s state.
  • Give every instance unique tab and panel IDs.
Up nextA moment of focus.

Find your building block.

Type to search the design system.

Press Esc to close · Ctrl / ⌘ K to search
Your privacy

Your choices. Your control.

We save your preferences in this browser. This release loads no optional analytics or advertising scripts.

Theme and preference choices help the site remember your settings.

No analytics service is active in this release. This choice is reserved for an integration that honours consent.

Read the website privacy information →