Tree View

A hierarchical disclosure tree for nested navigation and file structures.

File Browser

Interactive Selection

Pass a select_event to tree_view and a value on each tree_item to make leaf nodes selectable. The event includes a node param — no phx-click needed on each item.

Settings Tree
Workspace

Selected: general

Custom Triggers

Use the :trigger slot to replace the default label/icon with any content — icons, badges, or rich markup. The chevron and expand/collapse behavior stay intact.

Custom Triggers
src

Keyboard Navigation

The tree implements the WAI-ARIA tree pattern with roving tabindex:

  • Up/Down — move between visible items
  • Right — expand a collapsed folder, or move to its first child
  • Left — collapse an expanded folder, or move to the parent
  • Home/End — jump to the first/last visible item
  • Enter/Space — activate the item (follow link or emit select event)