Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Reporting lines

Draw people by reporting line, and let a search open the managers of anyone it finds.

The tree with search
Type a name in the search field. Matches open their managers, and the result count is announced.
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

Show code
<app-org-tree aria-label="Organisation">
    <app-org-tree-node id="ana" name="Ana Rao" role="Chief executive" />
    <app-org-tree-node id="ben" parent-id="ana" name="Ben Lee" role="VP, Growth" team="Growth" />
    …
</app-org-tree>

Overlay

Put the product's own figures under each name, such as objectives and progress, without the tree reading them.

Figures on each person
Each person shows a badge with their objectives and a thin progress bar. The tree does not read these values; the product writes them as the node's content.
  • Ana Rao
    Ana RaoChief executive
    4 objectives
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      3 objectives
      • Dev Shah
        Dev ShahGrowth managerGrowth
        2 objectives
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
          1 objectives
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
          1 objectives
      • Emma Stone
        Emma StoneGrowth managerGrowth
        2 objectives
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
          1 objectives
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      3 objectives
      • Farid Khan
        Farid KhanPlatform managerPlatform
        2 objectives
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
          1 objectives
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        2 objectives
        • Lena FischerEngineerPlatform
          1 objectives
        • Mo Haddad
          Mo HaddadEngineerPlatform
          1 objectives

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

Show code
<app-org-tree-node id="ben" parent-id="ana" name="Ben Lee">
    <app-badge tone="Info">3 objectives</app-badge>
    <app-progress value="64" max="100" size="Sm" label="Progress" />
</app-org-tree-node>

Highlight

Show where the people a product has selected sit, with every manager above them in view.

Highlighted people
Dev Shah and Gia Moreno stand out, with every manager above them. Everyone else dims.
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

Show code
<app-org-tree highlight-ids="dev,gia">…</app-org-tree>

Choose a person

Let someone choose one person, and show the choice back where the page can use it.

Selectable, with a chosen person
Click a person, or press Enter or Space on them. The chosen name is shown below the tree.
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

Chosen: Dev Shah

Show code
<app-org-tree selectable="true" selected="dev">…</app-org-tree>

Opening the levels

Open only the top levels at first, so a large organisation starts short and people open the rest.

Two levels open
Level 1 is the top. Only the first two levels open; a person at level 2 or deeper with reports starts closed.
  • Ana Rao
    Ana RaoChief executive

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

Show code
<app-org-tree expand-depth="2">…</app-org-tree>

Every option

Every value of every prop, one cell each.

nodes: the people list

child nodes, whole list (React: nodes={people})
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

child nodes, leadership only (React: nodes={leadership})
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

renderOverlay: product content under each name

node child content (React: renderOverlay) draws the badge and progress under each name
  • Ana Rao
    Ana RaoChief executive
    4 objectives
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      3 objectives
      • Dev Shah
        Dev ShahGrowth managerGrowth
        2 objectives
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
          1 objectives
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
          1 objectives
      • Emma Stone
        Emma StoneGrowth managerGrowth
        2 objectives
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
          1 objectives
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      3 objectives
      • Farid Khan
        Farid KhanPlatform managerPlatform
        2 objectives
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
          1 objectives
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        2 objectives
        • Lena FischerEngineerPlatform
          1 objectives
        • Mo Haddad
          Mo HaddadEngineerPlatform
          1 objectives

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

highlightIds: none or two people

highlight-ids omitted (default)
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

highlight-ids="dev,gia"
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

selectable: off or on

selectable="false" (default)
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

selectable="true"
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

selected: nobody, dev or gia

selected omitted (default)
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

selected="dev"
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

selected="gia"
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

onSelect: a person is chosen

wui-org-tree:select event (React: onSelect) runs when a person is chosen
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

expandDepth: all open, 2 or 3

expand-depth omitted, all open (default)
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

expand-depth="2"
  • Ana Rao
    Ana RaoChief executive

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

expand-depth="3"
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

searchable: on or off

searchable="true" (default)
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

searchable="false"
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

searchLabel: the field's name and placeholder

search-label="Find a person" (default: "Search by name")
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

resultsText: announced after a search

results-text="{count} matches" (default: "{count} found")
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

noResultsText: announced when nobody matches

no-results-text="Nobody matches" (default: "No one found")
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

expandLabel: a closed team's toggle

expand-label="Open {name}'s team" (default: "Show {name}'s team")
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

collapseLabel: an open team's toggle

collapse-label="Close {name}'s team" (default: "Hide {name}'s team")
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

helpText: keyboard help for a screen reader

help-text="Use the arrow keys to move" (default: the built-in instructions)
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Use the arrow keys to move

ariaLabel: the tree's accessible name

aria-label="Staff directory" (default: "Organisation")
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

id: the element id

id="org-every-option"
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

className: extra class names

class="org-tree-extra" (React: className, adds a class to the tree root)
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

ref: React only

ref (React only: Razor reaches the tree by its id, no visible change)
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.

Guidance

What to do, and what to avoid.

Use it when

  • Showing who reports to whom in an organisation, for reporting lines and review.
  • Choosing one person in a reporting structure, or highlighting the chain above a set of people.

Reach for something else when

  • A hierarchy of folders or categories, not people. → AppTreeView
  • A flat list of people to pick from. → AppSelect mode="search" or AppSelect mode="multiple"

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

false true
true false
false true
none dev, gia
all open 2 3
none dev gia
  • Ana Rao
    Ana RaoChief executive
    • Ben Lee
      Ben LeeVP, GrowthGrowth
      • Dev Shah
        Dev ShahGrowth managerGrowth
        • Hugo Brandt
          Hugo BrandtGrowth analystGrowth
        • Ines Duarte
          Ines DuarteGrowth analystGrowth
      • Emma Stone
        Emma StoneGrowth managerGrowth
        • Jun Okafor
          Jun OkaforGrowth analystGrowth
    • Chloe Park
      Chloe ParkVP, EngineeringPlatform
      • Farid Khan
        Farid KhanPlatform managerPlatform
        • Kai Nakamura
          Kai NakamuraEngineerPlatform
      • Gia Moreno
        Gia MorenoPlatform managerPlatform
        • Lena FischerEngineerPlatform
        • Mo Haddad
          Mo HaddadEngineerPlatform

React, generated from the controls
<AppOrgTree nodes={people} onSelect={(id, node) => …} />
Razor, the same props
<app-org-tree id="org-playground"> <app-org-tree-node id="ana" name="Ana Rao" … /> … </app-org-tree>

13 props. The 4 most used come first.

Used on most screens 4 props

PropTypeDefaultDescription
selectabledefault false bool false A person can be chosen by click, Enter or Space.
selecteddefault - string - The chosen person's id. The tree shows it as chosen until the page changes it.
highlight-idsdefault - string - Comma-separated ids to highlight, with every manager above them. Everyone else dims. Empty turns the mode off.
expand-depthdefault all open int all open Levels shown open at first render. A person at this level or deeper with reports starts closed.

Less common 9 props

PropTypeDefaultDescription
aria-labeldefault Organisation string Organisation Accessible name of the tree.
searchabledefault true bool true Draws the search field.
search-labeldefault Search by name string Search by name The search field's name and placeholder.
results-textdefault {count} found string {count} found Announced after a search; {count} is replaced.
no-results-textdefault No one found string No one found Announced when a search matches nobody.
expand-labeldefault Show {name}'s team string Show {name}'s team A toggle's name while its team is closed; {name} is replaced.
collapse-labeldefault Hide {name}'s team string Hide {name}'s team A toggle's name while its team is open; {name} is replaced.
help-textdefault - string - The keyboard help a screen reader reads.
wui-org-tree:selectdefault - event - A person was chosen. Its detail is the chosen person's id, as { id }.

<app-org-tree-node> takes:

6 props.

Less common 6 props

PropTypeDefaultDescription
iddefault required string required Unique across the list. Parent links and the selection carry it.
parent-iddefault - string - The id of the person's manager. Left out makes the node a root.
namedefault required string required The person's name, shown under the avatar and used for its initials.
roledefault - string - The person's role, shown under the name.
teamdefault - string - The person's team, shown under the name.
avatar-urldefault - string - Photo URL for the avatar. Initials are shown when absent.

Screen reader

3 notes
  • The tree follows the WAI-ARIA tree pattern: arrow keys move between people, Plus and Minus open and close a team, Enter chooses a person.
  • Each person's toggle has an accessible name that says whose team it opens or closes.
  • The search field announces how many people match, or that nobody does.