Taiga UI 5.0 is out!

Tree KIT

Examples API GitHub

TreeItem

[tuiTreeController]
Directive used to enable opening/closing of nodes with children. Boolean input is the default state.
boolean

Tree

[childrenHandler]
Handler function to get children for a node
TuiHandler<T, readonly T[]>
[content]
Content template for tree nodes
PolymorpheusContent<TuiTreeContext>
[data]
Data for the tree node
T
[tuiTreeController]
Directive used to enable opening/closing of nodes with children. Boolean input is the default state.
boolean
[map]
A map used with controller directive for manual programmatic toggling.
Map<T, boolean>
[trackBy]
Function used by *ngFor directive to render nested tree items.
TrackByFunction<T>

Tokens

TUI_TREE_CONTENT
Provide your own component used internally to display node content (see this example )
PolymorpheusContent<TuiTreeItemContext>
TUI_TREE_CONTROLLER
Provide your own open/closed controlling mechanism
TuiTreeController
TUI_TREE_ACCESSOR
Provide your own tracker for value/node pairs (so you can match TreeItem instances to their corresponding data: T when using Tree component with custom open/closed controller)
TuiTreeAccessor<T>