OrgChart Composition
Readable hierarchy cards with automatic connectors and collapsible branches. The
MIT-licensed react-organizational-chart runtime owns list layout and connector geometry;
Ceebee supplies token-based cards and native-button disclosure.
Usage
Interaction contract
The named region scrolls horizontally when the hierarchy is wider than its container. It contains nested native lists, not an ARIA tree widget. Each non-leaf card has one button showing its direct report count. Branches start expanded; toggling preserves the activating button and its focus. Separate roots remain separate real hierarchies.
Cards are read-only; no selection, dragging, editing, zoom or dismissal is provided. No transition delays a disclosure result, including under reduced motion. The layout runtime loads only on the client; server rendering uses the same Skeleton as the loading fallback.
Do
Use OrgChart to read hierarchical reporting relationships with full names.
Don't
Use it to edit process paths or infer permissions; DiagramEditor and application rules own those concerns.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
| nodes | OrgChartNode[] | — | Root nodes with unique ids, readable names, optional descriptions and nested children. Supply an acyclic hierarchy. |
| label | string | — | Accessible name for the scrollable region. |
| loadingLabel | string | — | Localizes the loading Skeleton name. |
| getCountLabel | (count: number) => string | — | Localizes the visible direct report count. |
| getToggleLabel | (node, expanded) => string | — | Localizes the button name for the current expand or collapse action. |
Skeleton
Keyboard
| Key | Result |
|---|---|
| Tab / Shift+Tab | Move between the scrollable region and visible branch buttons |
| Enter / Space | Toggle the focused branch; focus stays on its button |
| Arrow keys on the region | Scroll using the browser's native overflow behavior |
Tokens
--cb-space-*, --cb-radius-*, --cb-border, --cb-surface, --cb-bg-subtle,
--cb-fg-*, --cb-font-*, --cb-focus-*. Connector geometry is passed through
the runtime's documented line-height, width, color, radius and node-padding props.