TreeView

TreeView is a hierarchical list of items that may have a parent-child relationship where children can be toggled into view by expanding or collapsing their parent item.

Page navigation navigation

React examples

Default

  • Parent node
    • Child node one
    • Child node two
  • Sibling node one
  • Sibling node two

Nodes with leading visuals and trailing visuals

Leading and trailing visual guidelines

  • src
    • Avatar.tsx
    • Button.tsx
  • package.json

Nodes with leading actions

  • Item 1
  • Item 3

Without indentation

  • Parent node
    • Child node one
    • Child node two
  • Sibling node one
  • Sibling node two

Loading subtree - child node count known

When we know the number of loading child nodes, show "skeleton" nodes until the nodes finish loading. This reassures the user that their request is in progress and provides a minimal preview of what's loading.

  • Parent node
    • Loading 2 items
  • Sibling node one
  • Sibling node two

Loading subtree - child node count unknown

When we don't know the number of loading child nodes, show a generic loading indicator.

  • Parent node
    • Loading...
  • Sibling node one
  • Sibling node two

More code examples

The previous examples are a curated subset of the full capabilities of the TreeView component. For more examples, see the TreeView Storybook stories.

Props

Loading data for tree_view...