81 Pro components and page blocks

Get Pro

Org Chart

New

Preview

Customize

Open levels2

Installation

npx shadcn@latest add https://uibrik.com/r/org-chart.json
Adds the files to components/uibrik/org-chart and installs @tabler/icons-react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/org-chart.

Usage

import { OrgChart } from "@/components/uibrik/org-chart/org-chart";​const teamColors = {  Executive: "#71717a",  Engineering: "#6366f1",  Design: "#ec4899",  Sales: "#f59e0b",  Operations: "#10b981",};​<OrgChart  defaultDepth={2}  stackReports  minimap  teamColors={teamColors}  onSelect={(person) => {}}  // root={…}/>

Props

OrgChart
defaultDepth
Type number
2
Levels of the tree open on mount.
stackReports
Type boolean
true
Teams of three or more individual contributors sit in a column under their manager.
minimap
Type boolean
true
Overview of the whole tree in the corner. Hidden on narrow screens.
root
Type OrgPerson
SAMPLE_ORG
{ id, name, title, team?, avatar?, email?, location?, timeZone?, reports?: OrgPerson[] }. The person at the top.
teamColors
Type Record<string, string>
DEFAULT_TEAM_COLORS
Colour of the dot beside each team's titles.
onSelect
Type (person: OrgPerson | null) => void
–
Called when someone is selected or the profile closes.
className
Type string
–
Classes for the outer shell. It fills its parent's height.