Tree View

A hierarchical navigation control that displays nested data in an expandable/collapsible structure that quickly outlines parent/child relationships.

Component checklist

Status

The status of the component

Ready for use!

Figma component

A link to the Figma library where the component lives.

Documentation link

A connected documentation page in Supernova

Code Sandbox

undefined

Usage


Alignment Uniformity

Do
Tree view items with chevrons positioned to the left.

The default alignment for the expand/collapse chevron is to the left.

Caution
Tree view items with chevron positioned to the right.

In instance where the chevron must be positioned to the right, all the chevrons of the group should be positioned to this side.

Don't
Tree view items with chevron positioned to the left and right randomly.

At no point should a tree view's branches have a combination of right and left aligned chevrons in the same group. There must be uniformity in the alignment of tree view chevrons.

 

Heading Usage

Do
The comfy size tree view items with the extra functionality.

The tree view group header, provides additional functionality and context to comfy sized tree views.

Don't
The compact tree view items with the comfy item functionality.

Given the size of the tree view group header, this element should not be used alongside compact size tree views in order to prevent noise.

 

Iconography Usage

Do
Tree view branches displayed as icon and text label.

Icons can be used alongside branches (but not leafs) to provide users with additional context.

Don't
Some tree view branches displayed as icon + text label and others with label only.

Icons should be applied to all or none of the branches of a tree view. This is to prevent a jarring and confusing user experience.

 

Quantity Meter Application

Do
Tree view branches with right-aligned additional data.

The quantity meter provides addition information/data that may be beneficial to users. This can be applied to both branches and leafs.

Don't
Some tree view branches have additional data and others don't.

Within a tree view group, either all or none of the tree view items should have a quantity meters.

 

Levels Limits

Do
Tree view with 3 child levels.

The level limit for branches is set at the grandchild level (level 3) whereas the limit for leafs is set at the great-grandchild level (level 4).

Don't
Tree view with 4 child levels.

At no point should a leaf and/or branch exceed the level limit.

 

Badge Application

Do
Tree view branches with right-aligned badges.

Context badges, provide additional information to branches.

Don't
Tree view branches and all leaves with right-aligned badges.

Badges should not be used on leafs and grandchild level branches.

 

Size Uniformity

Do
Tree view with all branches and leaves the same text size.

Retaining the same size, increases the scan-ability/discoverability of items within a tree view group.

Don't
Tree view with branches and leaves cascading into smaller text the deeper the levels by mixing comfy and compact sizes.

Avoid mixing comfy and compact sized tree view items together.

 

Parent/Child Selection Relationship

Do
Tree view with leaves and branches being interconnected.

Multi-select branches and leafs are intimately connected. If a leaf is selected then this selection status is also represented at the branch level.

Don't
Tree view with leaves and branches not connected.

Always surface selection statuses at the branch level.

 

Search Best Practices


search - default

Default Behavior

The search within tree view header group is a UI element that provides users with a shortcut to their desired item. Within particularly large and deep tree view groups (16+ parent branches), the search field can be an important and useful element for users.

When unselected, the search field displays a placeholder state.


search - in-progress

Mid typing behavior

After three letters have been inputted into the search field, the tree view group begins to filter down to show all the relevant leafs that have a label which is associated to the input placed in the search.

Given the relationship between leafs and branches, at all times the branch be shown alongside the leaf.


search - completed

Completed typing behavior

Once the user has completed inputting the appropriate input into the search field, the leaf most closely matching the user’s input is presented. Again given the relationship between leafs and branch, the full level relationship between the two should be shown.