Components
← All components

Tree View

stimeo--tree-view

A single-select tree: navigate, expand/collapse, and typeahead with the keyboard.

  • Tree View

The stimeo--tree-view controller implements the WAI-ARIA Tree View (single-select) pattern. Parent/child structure is read from the DOM nesting (a treeitem followed by its child group). The whole tree is one Tab stop (roving tabindex). ArrowDown/ArrowUp move between visible items; Home/End jump to the first/last visible item; printable characters typeahead by label prefix. ArrowRight expands a collapsed parent or steps into its first child; ArrowLeft collapses an expanded parent or steps to the parent item. Enter/Space/click select the item (single selection via aria-selected). aria-expanded and each child group's hidden stay in sync, dispatching stimeo--tree-view:toggle; selection dispatches stimeo--tree-view:select.

running
  • app
    • application.rb
  • README.md
  • Gemfile

Keyboard

KeyAction
↓ / ↑ Move to the next / previous visible item.
Expand a collapsed parent, else step into the first child.
Collapse an expanded parent, else step to the parent item.
Home / End Move to the first / last visible item.
Enter / Space Select the item.
Printable characters Typeahead to the next item whose label starts with the text.