Organization Chart for Angular
Introduction
Section titled “Introduction”Renders a reporting hierarchy from flat nodes (id, parentId) as a tidy tree, top-down or left-to-right, with elbow connectors and cards (initials, name, title, description, or custom content). The nodes are an ARIA tree with one roving tab stop and tree keyboard navigation (arrows, Home/End, *, typeahead); focus movement pans the view so the node stays visible. Pan by dragging the background, zoom with the toolbar, +/-/0 keys, or Ctrl/Cmd + wheel; fit and center on a node. Reports load lazily (loadChildren) with cancellation and a timeout. search, pathTo, and reveal find a person, expand their managers, and highlight the path. In edit mode nodes are re-parented by pointer drag, Ctrl/Cmd+X then Ctrl/Cmd+V, or the toolbar Move / Move here buttons, with canMove vetoes, locked nodes, and undo/redo. The layout function (layoutOrgChart) is pure; the org-chart-export subpath saves the visible chart as SVG or PNG.
- Lazy branchesLoad teams on demand when a manager is expanded, with cancellation and timeouts.
- Search and revealFind people by name or title and scroll them into view.
- Zoom and fitPan, zoom, and fit the whole chart in vertical or horizontal layout.
- Edit by movingMove people to another manager with drag or keyboard, with undo and redo.
- SVG and PNG exportDownload the chart as an SVG or PNG image.
Behavior, design tokens, and limitations are described on the Organization Chart page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component } from '@angular/core';import type { OrgChartNode, OrgChartNodeSelectDetail } from '@absoluteui/components/org-chart';import { AuiOrgChart } from '@absoluteui/angular/org-chart';
@Component({ selector: 'app-org', imports: [AuiOrgChart], template: `<aui-org-chart label="Company" [nodes]="nodes" orientation="horizontal" (nodeSelected)="open($event)"></aui-org-chart>`,})export class OrgComponent { readonly nodes: OrgChartNode[] = [ { id: 'ceo', parentId: null, label: 'Ada Lovelace', title: 'CEO' }, { id: 'cto', parentId: 'ceo', label: 'Grace Hopper', title: 'CTO' }, ];
open(detail: OrgChartNodeSelectDetail): void { // show detail.node in a side panel }}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiOrgChart } from '@absoluteui/angular/org-chart';Defaults for every instance: provideAbsoluteUIConfig({ components: { orgChart: { ... } } }) (see Configuration).
API reference
Section titled “API reference”<aui-org-chart>
Section titled “<aui-org-chart>”Class AuiOrgChart; template reference #ref="auiOrgChart".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
label |
string |
Required. Accessible name of the tree (aria-label); the toolbar is named ‘{label} controls’. Non-empty. | |
expanded |
readonly string[] |
Explicitly expanded node ids (overrides expandDepth). Read the current set from the expanded getter. | |
selected |
string | null |
Selected node id (aria-selected=true). | |
renderNode |
(node: Readonly<OrgChartNode>, context: OrgChartRenderContext) => Node |
Card content ({ depth, expanded, childCount, doc } context). Return non-interactive content: the treeitem is the control and its text is its accessible name. Default: initials, label, title, description. | |
loadChildren |
(node: Readonly<OrgChartNode>, signal: AbortSignal) => Promise<readonly OrgChartNode[]> |
Loads the reports of a node with hasChildren on its first expansion (validated; each parentId must be a known or returned node). Rejections and timeouts keep the node collapsed, announce the failure, and emit aui-load-error. | |
editable |
boolean |
false |
Edit mode: re-parent nodes by pointer drag onto the new manager, Ctrl/Cmd+X then Ctrl/Cmd+V, or the toolbar Move / Move here buttons; undo and redo. |
canMove |
(node: Readonly<OrgChartNode>, parent: Readonly<OrgChartNode> | null) => boolean |
Veto a move (edit mode and moveNode). Cycles and locked nodes are always refused. | |
historyLimit |
number |
'50' |
Undo depth, integer 0..500 (0 disables history). |
nodeRadius |
number |
Card corner radius in CSS px, 0..50. Unset: –aui-chart-node-radius, else –aui-chart-corner-radius, else the theme’s radius-md. Written as –aui-chart-node-radius through the CSSOM; the SVG export keeps it. | |
orientation |
OrgChartOrientation |
'vertical' |
‘vertical’: managers above their reports (top-down); ‘horizontal’: managers at the inline start, reports toward the inline end. |
nodeWidth |
number |
'200' |
Card width in CSS px, integer 80..600. |
nodeHeight |
number |
'72' |
Card height in CSS px, integer 32..400. |
siblingGap |
number |
'24' |
Space between neighboring cards of a level, integer 4..400 CSS px. |
levelGap |
number |
'48' |
Space between levels (connector length), integer 16..400 CSS px. |
expandDepth |
number |
'2' |
Levels expanded initially when expanded is not given (integer 0..64; 0 shows only the top-level nodes). |
minZoom |
number |
'0.2' |
Smallest zoom factor, 0.05..1. |
maxZoom |
number |
'2' |
Largest zoom factor, 1..8. |
requestTimeoutMs |
number |
'30000' |
loadChildren timeout in ms (integer 100..600000); the signal is aborted with a TimeoutError. |
locale |
string |
'en-US' |
Locale of search, typeahead, report counts, zoom percentages, and messages. |
direction |
Direction |
'ltr' |
rtl mirrors the layout (first report on the right; horizontal charts grow to the left) and swaps ArrowLeft/ArrowRight. |
Two-way bindings
Section titled “Two-way bindings”| Model | Type | Change output | Description |
|---|---|---|---|
[(nodes)] |
readonly OrgChartNode[] |
(nodesChange) |
Flat nodes: { id (unique), parentId (manager id or null for a top-level node), label (name), title?, description?, hasChildren? (reports exist but load through loadChildren), locked? (cannot be moved in edit mode) }. Validated: unique ids, known parents, no cycles (ORG_CHART_OPTIONS). Sibling order follows the array. Replacing it with update() clears the undo history. |
Outputs
Section titled “Outputs”| Output | Payload | Description |
|---|---|---|
(nodeSelected) |
OrgChartNodeSelectDetail |
A node was selected by click, Enter, or Space. Re-emits aui-node-select. |
(expandChange) |
OrgChartExpandChangeDetail |
A node was expanded (after its reports loaded) or collapsed through the UI or setExpanded. Re-emits aui-expand-change. |
(nodeMoved) |
OrgChartNodeMoveDetail |
A node got a new manager (drag, paste, toolbar, moveNode, undo, redo). Save detail.nodes or send the change to the server. Re-emits aui-node-move. |
(zoomed) |
OrgChartZoomDetail |
The zoom changed through the toolbar, keys, Ctrl/Cmd + wheel, or zoomTo (fit does not emit). Re-emits aui-zoom. |
(loadError) |
OrgChartLoadErrorDetail |
loadChildren rejected, timed out, or returned invalid nodes. Re-emits aui-load-error. |
Read-only state
Section titled “Read-only state”| Property | Type | Description |
|---|---|---|
canUndo |
Signal<boolean> |
Move history is available. |
canRedo |
Signal<boolean> |
Move history is available. |
scale |
Signal<number> |
Current zoom factor. |
Methods
Section titled “Methods”Call them through a viewChild query or a template reference.
| Method | Description |
|---|---|
setExpanded(id: string, expanded: boolean): Promise<void> | undefined |
Expand (loading lazy reports first) or collapse a node. Emits aui-expand-change. |
expandAll(): void |
Expand every node with loaded reports (lazy nodes are not loaded) / collapse all. |
collapseAll(): void |
Expand every node with loaded reports (lazy nodes are not loaded) / collapse all. |
search(query: string): string[] | undefined |
Ids whose label, title, or description contains the text (case-insensitive, locale-aware), in tree order, including collapsed nodes. |
pathTo(id: string): string[] | undefined |
Ids from the top-level node down to the node. |
reveal(id: string, options?: { focus?: boolean; select?: boolean; highlight?: boolean; } | undefined): void | undefined |
Expand the node’s managers, center it, highlight its path (cards and connectors; default on), focus it (default) and optionally select it; announces ‘Path: A, B, C.’ |
clearHighlight(): void |
Remove the path highlight. |
select(id: string | null): void |
Select a node without emitting aui-node-select. |
centerOn(id: string): void |
Center the view on a visible node (keeps the zoom). |
fit(): void |
Scale (at most 100 %) and center the whole visible chart in the viewport; announces the zoom. |
zoomTo(scale: number): void |
Zoom around the viewport center, clamped to minZoom..maxZoom; announces ‘Zoom {percent}’ and emits aui-zoom. |
moveNode(id: string, parentId: string | null, index?: number | undefined): boolean | undefined |
Re-parent a node (index among the new siblings, default last; null parent = top level). Returns false (and announces) when refused: cycle, locked node, or canMove. Undoable; emits aui-node-move. |
undo(): boolean | undefined |
Undo / redo the last move (parent and position). Announce and emit aui-node-move (reason ‘undo’ / ‘redo’); false when there is nothing to undo/redo. |
redo(): boolean | undefined |
Undo / redo the last move (parent and position). Announce and emit aui-node-move (reason ‘undo’ / ‘redo’); false when there is nothing to undo/redo. |
Templates
Section titled “Templates”Customize rendering with AuiItem from @absoluteui/angular/templates.
Accessibility and performance
Section titled “Accessibility and performance”Pattern: WAI-ARIA APG Tree View (single select) with flat treeitems carrying aria-level, aria-setsize, and aria-posinset, kept in DOM reading order, with one roving tab stop. Connectors are decorative SVG. Moves in edit mode use cut/paste keys and toolbar buttons (no deprecated ARIA drag-and-drop attributes) with live-region announcements.
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Organization Chart: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.