Prism Docs

Tree

A hierarchical components for representing directory structures, navigation menus, and nested data.

Basic Tree

Parent 1
Parent 2
<prism-tree [data]="treeData" />

Directory Mode

src
app
assets
index.html
<prism-tree 
  [data]="directoryData" 
  [directoryMode]="true" 
  [expandedKeys]="['root']"
/>

Checkable

Parent 1
Parent 2
Checked: []
<prism-tree 
  [data]="treeData" 
  [checkable]="true" 
  [(checkedKeys)]="checkedKeys"
/>

Tree API

NameTypeDefaultDescription
dataPrismTreeNode[]-The tree data source
showLinebooleanfalseWhether to show connecting lines
directoryModebooleanfalseWhether to use directory icons
checkablebooleanfalseWhether to show checkboxes
multiplebooleanfalseWhether to allow multiple selection
searchstring""Filter the tree based on title