Introducing PrimeReact v11-alpha 🎉Discover Now

useOrgChart

Hook that renders hierarchical data as an organization chart.

Usage#

import { useOrgChart } from '@primereact/headless/orgchart';
const instance = useOrgChart();

API#

useOrgChart#

NameTypeDefault
valueTreeNode[]—
The data of the org chart.
gapnumber | number[]—
The gap of the org chart.
selectablebooleantrue
Whether the nodes of the org chart are selectable.
collapsiblebooleanfalse
Whether the nodes of the org chart are collapsible.
selectionMode"multiple" | "single"—
The selection mode of the org chart.