• Overview
@angular/aria/tree

Tree

Class

A Tree container.

API

    
      class Tree<V> {}
    
    

id

any

A unique identifier for the tree.

orientation

any

Orientation of the tree.

multi

any

Whether multi-selection is allowed.

disabled

any

Whether the tree is disabled.

selectionMode

any

The selection strategy used by the tree.

focusMode

any

The focus strategy used by the tree.

wrap

any

Whether navigation wraps.

skipDisabled

any

Whether to skip disabled items during navigation.

typeaheadDelay

any

Typeahead delay.

value

any

Selected item values.

textDirection

any

Text direction.

currentType

any

The aria-current type.

onFocus

void
@returnsvoid

register

void
@paramchildTreeItem<V>
@returnsvoid

unregister

void
@paramchildTreeItem<V>
@returnsvoid

scrollActiveItemIntoView

void
@paramoptionsScrollIntoViewOptions
@returnsvoid

Description

A Tree container.

Transforms nested lists into an accessible, ARIA-compliant tree structure.

<ul ngTree [(value)]="selectedItems" [multi]="true">  <li ngTreeItem [value]="'leaf1'">Leaf Item 1</li>  <li ngTreeItem [value]="'parent1'">    Parent Item 1    <ul ngTreeItemGroup [value]="'parent1'">      <ng-template ngTreeItemGroupContent>        <li ngTreeItem [value]="'child1.1'">Child Item 1.1</li>        <li ngTreeItem [value]="'child1.2'">Child Item 1.2</li>      </ng-template>    </ul>  </li>  <li ngTreeItem [value]="'leaf2'" [disabled]="true">Disabled Leaf Item 2</li></ul>
Jump to details