Skip to main content
  1. Docs
  2. Components
  3. Data display

Tree view

A hierarchy to open, close and choose from: organisation units, nested groups, permissions.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.6
Renders
<ul role="tree">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Playground

Every prop, live, and the code it takes.

  • Acme Pvt Ltd1,284
    • Finance74
Tree
units.tsx
import { TreeView } from "@qeetrix/react/experimental";

<TreeView items={units} label="Organisation units" defaultExpanded={["acme"]} />

02

Organisation units

One Tab stop: Up and Down move, Right opens a node or steps in, Left closes it or steps out, and a letter jumps.

  • Acme Pvt Ltd1,284
    • Finance74

03

Choosing one

selected and onSelectedChange: Enter, Space or a click selects a node.

  • Acme Pvt Ltd1,284
    • Engineering412
      • Platform96
      • Mobile58
    • Finance74
Selected: platform

04

Permissions

checkable: a checkbox per node; a parent is mixed while some of its nodes are on. A disabled node is skipped by the keys and by its parent's tick.

  • Users
    • View users
    • Reset MFA
    • Delete users
  • Applications
    • View applications
    • Rotate client secrets
  • Audit log
3 granted: users.view, users.mfa, audit

05

In a card

Beside the members of the unit that's selected.

Organisation units

  • Acme Pvt Ltd1,284
    • Engineering412
      • Platform96
      • Mobile58
    • Finance74
Next — Tree viewUsage