Introducing PrimeReact v11-alpha 🎉Discover Now
styledData

OrgChart

OrgChart visualizes hierarchical organization data.

  • AE
    Amy Elsner
    Founder & CEO
    • AJ
      Asiya Javayant
      Product Lead
      • AF
        Anna Fali
        UX Designer
      • BD
        Bernardo Dominic
        Product Manager
    • OL
      Onyama Limba
      Engineering Lead
      • ES
        Elwin Sharvill
        Frontend Engineer
      • SS
        Stephen Shaw
        Backend Engineer
preview

Usage#

import { OrgChart } from '@primereact/ui/orgchart';
<OrgChart.Root value={data}>
    <OrgChart.List />
</OrgChart.Root>

Examples#

Basic#

Displays hierarchical data as an interactive tree of nodes.

  • Founder
    • Product Lead
      • UX/UI Designer
      • Product Manager
    • Engineering Lead
      • Frontend Developer
      • Backend Developer
basic-demo

Collapsible#

Use the collapsible prop to make nodes collapsible.

  • Founder
    • Product Lead
      • UX/UI Designer
      • Product Manager
    • Engineering Lead
      • Frontend Developer
      • Backend Developer
collapsible-demo

Selectable#

Use the selectable prop to make nodes selectable. Besides, use the selectionMode prop to specify the selection mode.

  • Founder
    • Product Lead
      • UX/UI Designer
      • Product Manager
    • Engineering Lead
      • Frontend Developer
      • Backend Developer
selectable-demo

Partial Collapsible & Selectable#

Use the collapsible attribute on a node to make a node collapsible and the selectable attribute on a node to make a node selectable partially.

  • Founder
    • Product Lead
      • UX/UI Designer
      • Product Manager
    • Engineering Lead
      • Frontend Developer
      • Backend Developer
partial-demo

Default Collapsed & Selected#

Use the collapsedByDefault attribute on a node to make a node collapsed by default and the selectedByDefault attribute on a node to make a node selected by default.

  • Founder
    • Engineering Lead
      • Frontend Developer
      • Backend Developer
default-demo

Custom#

Use the custom attribute on a node to render a custom node content.

  • Acme StackProduction technologies
    • FrontendUser-facing apps
      • React
      • Next.js
    • BackendAPIs & services
      • Postgres
      • Redis
    • DevOpsBuild & deploy
      • Docker
      • Kubernetes
custom-demo

Template#

  • AWS Cloud
    us-east-1
    • Compute
      Workloads & runtime
      • EC2
        Virtual servers
      • Lambda
        Serverless functions
    • Storage
      Data persistence
      • S3
        Object storage
      • RDS
        Managed databases
    • Networking
      Edge & access
      • CloudFront
        Global CDN
      • IAM
        Access policies
template-demo

Accessibility#

Screen Reader#

OrgChart uses ARIA roles and attributes for screen reader accessibility. The root element has role="tree" with aria-multiselectable for multiple selection support. Each tree item uses role="treeitem" with aria-level for hierarchy, aria-expanded for collapse state, and aria-selected for selection state. Child nodes are grouped with role="group".

Keyboard Navigation#

OrgChart.Node

KeyFunction
tabMoves focus through the focusable nodes within the chart.
enterToggles the selection state of a node.
spaceToggles the selection state of a node.

OrgChart.CollapseButton

KeyFunction
tabMoves focus through the focusable elements within the chart.
enterToggles the expanded state of a node.
spaceToggles the expanded state of a node.