Skip to content

Tree

Last updated 27 Oct 2026

NbTree and NbTreeNode provide a hierarchical tree view for navigating nested data structures like file systems, project explorers, or organizational charts.

Keyboard Navigation ​

KeyAction
Arrow DownMove focus to next visible node
Arrow UpMove focus to previous visible node
Arrow RightExpand a collapsed branch; no effect on leaves
Arrow LeftCollapse an expanded branch
EnterSelect the focused node
HomeMove focus to the first node
EndMove focus to the last visible node
F2Emits dblclick event (for rename workflows)

ARIA Roles ​

  • NbTree renders <ul role="tree">
  • NbTreeNode renders <li role="treeitem">
  • Branch nodes include aria-expanded="true|false"
  • Selected nodes include aria-selected="true"
  • Disabled nodes include aria-disabled="true"
  • Draggable nodes include aria-grabbed="true|false" during drag
  • Child node lists render as <ul role="group">

Focus Management ​

Nodes are focusable via tabindex="-1". Arrow key navigation managed by the tree container. Focus ring uses the primary color via inset box-shadow.