Skip to content

TreeView

Nested things: file trees, category trees, org charts. Right expands, Left collapses, arrows travel what you can see.

Example

  • docs
  • package.json
<Tree label="Project files">
  <TreeItem id="node-src" label="src">
    <TreeItem id="node-button" label="Button.astro" />
  </TreeItem>
  <TreeItem id="node-docs" label="docs" />
</Tree>

Props

PropTypeDefaultDescription
label (Tree)stringTreeLandmark name.
id / label (Item)string-Node identity + text.
expandedbooleanfalseOpen on load.

Accessibility