Skip to content

A hierarchical tree view with expand/collapse, keyboard navigation, optional checkboxes, and selection. Use for file explorers, org charts, permission trees, and category navigation.

atlas-tree

Examples

File tree

Nodes are data with optional children. Arrow keys move and expand; [(expandedKeys)] holds the open nodes.

  • src
  • package.json

Checkable

With checkable and selectionMode="multiple" , checking a parent checks its children.

  • Orders
  • Reports

Checked: orders.read

Single selection

selectionMode="single" makes one node the selection ( [(value)] ), for a folder picker. [(expandedKeys)] keeps the open folders in your state.

  • Projects
  • Archive (read-only)

Move to: atlas

API

Generated from the library source, so it always matches the code.

AtlasTreeComponent atlas-tree

InputTypeDefaultDescription
nodes requiredTreeNode[]— The root nodes; each node can have children , an icon , and be disabled .
selectionMode 'none' | 'single' | 'multiple''none' Lets the user select one or several nodes.
checkable booleanfalse Adds a checkbox to every node; each node is checked on its own. Implies multiple selection unless selectionMode is single .
value two-waystring[][] Keys of the selected (or checked) nodes, two-way.
expandedKeys two-waystring[][] Keys of the expanded nodes, two-way.
expandAll booleanfalse Starts with every node expanded.
indentPx number24 Indentation per level, in pixels.
aria-label string | undefinedundefined Accessible name of the tree.
class string'' Extra CSS classes, merged with the component's own through cn() ; yours win on conflicts.
OutputPayloadDescription
nodeClickTreeNode Emits the node when it is activated (click or Enter); never for a disabled node.
nodeExpandTreeNodeEvent Emits when a node is expanded or collapsed.
selectionChangeTreeSelectionEvent Emits the selected keys after every selection change.

Types

TreeNode

PropertyTypeDescription
id string Unique identifier
label string Display label
icon? string Optional icon name
children? TreeNode[] Child nodes (presence makes this node expandable)
disabled? boolean Whether the node is disabled
data? unknown Custom data payload

TreeNodeEvent

PropertyTypeDescription
node TreeNode —
expanded boolean —

TreeSelectionEvent

PropertyTypeDescription
selected string[] —