Skip to content

Jump to…

↑ ↓ to move · Enter to open · Esc to close

Components / Navigation

Navigation & overlays

Live examples with keyboard behaviour, markup contracts and explicit state coverage. Cookie choices are saved locally for this demo only.

Tabs

Switch related views without navigation. Arrow keys wrap; Home and End select the first and last tab.

Website refresh

Three review items are ready for your team.

Markup & reuse: tabs
<div data-tabs>
  <div role="tablist" aria-label="Project detail">
    <button id="tab-a" role="tab" class="dd-filter"
      aria-selected="true" aria-controls="panel-a">Overview</button>
  </div>
  <div id="panel-a" role="tabpanel" aria-labelledby="tab-a"
    tabindex="0">Panel content</div>
</div>

Place each group inside a data-navigation-example root. Import src/theme/ts/component-navigation.ts once. Give inactive tabs aria-selected="false" tabindex="-1" and their panels hidden. Use unique IDs. Dynamic roots can call the exported initComponentNavigation(root) once after insertion. Horizontal, automatically activated tabs only; disabled and asynchronously loaded tabs are not implemented.

Disclosure

A native summary button reveals secondary information. Enter and Space toggle it; no controller is needed.

Review requirements

One maintainer must approve the change. Required checks must pass before merging.

<details>
  <summary>Review requirements</summary>
  <p>One maintainer must approve the change.</p>
</details>

Add open for the expanded initial state. Multiple disclosures remain independent.

Dialog & drawer

Both use native modal dialogs: background content is inert, focus stays inside, and Escape or Close returns to the trigger. Clicking the backdrop does not dismiss these examples.

Markup & reuse: overlays
<button data-dialog-open="example-dialog">Open dialog</button>
<dialog id="example-dialog" aria-labelledby="example-title">
  <h2 id="example-title">Review settings</h2>
  <form method="dialog">
    <button autofocus>Close</button>
  </form>
</dialog>

Keep the trigger and dialog inside one data-navigation-example root and a unique target ID. Multiple triggers can open the same dialog; focus returns to the actual opener. Import the controller once. The drawer only changes positioning and height. These fixtures demonstrate presentation, not saving. Nested overlays and long-form validation are outside this example.

Review settings

Try a native select inside a modal. This preview does not save changes.

Review context

Supporting details stay separate from the main workspace. This is a modal drawer, not a persistent side panel.

Project
Website refresh
Owner
Jamie Davis
Required check
Accessibility review
View review example

Necessary storage remembers your choice. Optional categories are off until you choose them.