Org Chart

A collapsible React org chart with CSS connector lines, initials avatars, team colour stripes, report counts on every manager and arrow key navigation between people.

src/registry/ui/org-chart.tsx/r/org-chart.json

Installation#

bash
npx shadcn@latest add @minidev/org-chart

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/org-chart.json

Usage#

tsx
import { OrgChart } from "@/components/ui/org-chart"

export function Example() {
  return <OrgChart />
}

API reference#

OrgChart props
PropTypeDefault
dataOrgNodeSAMPLE
defaultExpandDepthnumber0
defaultExpandedstring[]["theo"]
selectedIdstring-
defaultSelectedIdstring-
onSelect(node: OrgNode) => void-
teamTonesPartial<Record<string, OrgTone>>-
aria-labelstring-
classNamestring-

Dependencies#

npm

lucide-reactmotion

Built from

No other MiniDev files
All dashboard components

Learn more