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

When to use

Use it for
  • Organisation units and nested groups, to choose one.
  • A role's permissions, ticked by area.
Not for

02

Anatomy

  1. 1tree-toggle<span>The chevron of a node with children: turns as it opens.
  2. 2tree-icon<svg>16px, for the kind of node.
  3. 3tree-item<li role="treeitem">The selected node: aria-selected.
  4. 4tree-guide<span>A guide line per level.
  5. 5tree-meta<span>At the row's end: a count, a status.

03

Do and don't

Say how many
DoA count at each row's end: where the people are.
Don'tBare names: every node must be opened to find out.
Show what can't be granted
DoDisabled, in place: the permission exists, and this role can't give it.
Don'tLeft out: nobody can tell it exists.

04

Content

  • Labels as the thing is named elsewhere: Engineering, Reset MFA.
  • label names the tree: Organisation units, Permissions.
  • meta for a count or a status, not for a second label.
Next — Tree viewAPI