Design system · v1.0

Accessible component showcase

Five production-grade widgets built with vanilla JavaScript and hand-written CSS. Correct focus management, ARIA state that never drifts from the visual, and full keyboard operability by design.

Tabs

Roving tabindex with aria-selected, aria-controls and aria-labelledby wired end-to-end. Hidden panels are truly removed from the a11y tree.

What this component does

Tabs let users switch between large related views without leaving the page. The selected tab is always reachable with a single Tab press, and arrow keys move between tabs without hunting for focus.

Keyboard ←→ move focus & select· Home/End first/last· Tab enters panel content

Combobox

An autocomplete input using the aria-activedescendant pattern: the listbox is never focusable, and the highlighted option is tracked on the input itself.

Idle

Start typing to search 20 cities. Arrow keys highlight, Enter selects.

Keyboard type to filter· ↓↑ move highlight· Enter selects· Esc closes & reverts

Accordion

A disclosure group where any number of regions may be open at once. Height animates first; hidden is only touched at the end of the transition.

Install from the registry and add the stylesheet once:

npm install @clarity/ui @clarity/styles

Clarity UI ships per-component entry points, so only the code you use ends up in your bundle.

Keyboard Tab reaches every trigger· Enter/Space toggles· multiple regions may be open

Clarity UI — a fictional design system built for accessibility demonstration. Vanilla TS, zero dependencies. View source: every interaction is a few lines of readable JavaScript.