ValyroUI Русская версия

Org Chart

Org chart: zoomable, pannable tree with search and collapsible branches. Pro · Work and teams › Team and documents

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add org-chart
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { OrgChart } from 'valyro-ui-pro';

Props

PropTypeDefault
data *OrgPersonTop of the hierarchy; each person's children are their direct reports.
expandedIdsstring[]Ids of people whose reports are shown.
defaultExpandedIdsstring[]Initial expandedIds when uncontrolled.
onExpandedIdsChange(ids: string[]) => voidCalled with the new expandedIds when it changes.
defaultExpandDepthnumber2Levels shown expanded when defaultExpandedIds is not set. Default 2 (the root and its reports).
selectedIdstring | nullControlled selectedId; use with onSelectedIdChange.
defaultSelectedIdstring | nullnullInitial selectedId when uncontrolled.
onSelectedIdChange(id: string | null) => voidCalled with the new selectedId when it changes.
onPersonClick(person: OrgPerson) => voidClick, Enter or Space on a person.
departmentColorsRecord<string, BadgeColor>Badge colour per department; others get a stable colour from their name.
heightCSSProperties['height']560Height of the chart area in the tree layout. Default 560. The outline is as tall as its rows.
layout'tree' | 'outline' | 'auto''auto'tree: the hierarchy top-down, panned and zoomed in a fixed area. outline: one column with reports indented under their manager, as tall as its rows (for phones). auto (default): the outline below 480px of width.
searchablebooleantrueShow the people search. Default true.
minZoomnumber0.25Smallest scale for buttons, wheel, pinch and fit-to-view; 1 draws cards at their natural size.
maxZoomnumber2Largest scale for buttons, wheel and pinch; 1 draws cards at their natural size.
toolbarReactNodeExtra controls next to the search.
localestringBCP 47 locale for numbers and dates; defaults to the ThemeProvider's, then the browser's.
labelsPartial<OrgChartLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

  • Team Members — Team members: roles, email invites, pending invitations, seat count
  • Activity Feed — Activity feed
  • Rich Text Editor — Text editor: Markdown shortcuts, slash commands, mentions, links and images
  • Calendar View — Event calendar
  • Scheduler — Scheduler: day, week, month and resource timeline, drag and drop, recurrence
  • Kanban Board — Task board
  • Gantt Chart — Gantt charts with dependencies and drag to reschedule
  • Booking Slots — Meeting booking: calendar, slots in the guest’s time zone, form and confirmation
  • CRM Pipeline — Deal pipeline: stages, amounts and probabilities, drag between stages
  • Approval Flow — Multi-stage approvals: sequential and parallel stages, decisions with reasons, history
  • Goal Tracker — OKRs: objectives and key results, statuses, confidence, check-ins with history
  • Onboarding Checklist — Onboarding checklist: progress, hints with CTAs, dismissal and celebration

Previous: Team Members · Next: Activity Feed · All Work and teams