TidalUI

Org chart preview

Explore reporting relationships through an accessible team tree and connected person cards.

pro · Blocks · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/org-chart

Import components/ui/tidal.css, components/ui/org-chart.css. Wrap installed components in tidal-scope.

Preview

Org chart component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/org-chart.css";
import{TidalOrgChart}from"./components/ui/org-chart";
export default()=><div className="tidal-scope"><TidalOrgChart expandedIds={["example"]} onExpandedChange={() => {}} onSelectedChange={() => {}} people={[{id:"example",name:"Demo",role:"value",managerId:"example"}]} selectedId={"example"} title={"Demo"}/></div>;

API and props

TidalOrgChart.expandedIds (required)
ReadonlyArray<string>

Required expanded ids value accepted by this exported component.

TidalOrgChart.onExpandedChange (required)
(ids: readonly string[], person: TidalOrgPerson, event: OrgEvent) => void

Callback invoked when the expanded change interaction is proposed.

TidalOrgChart.onSelectedChange (required)
(id: string, person: TidalOrgPerson, event: OrgEvent) => void

Callback invoked when the selected change interaction is proposed.

TidalOrgChart.people (required)
ReadonlyArray<TidalOrgPerson>

Required people value accepted by this exported component.

TidalOrgChart.selectedId (required)
string | null

Required selected id value accepted by this exported component.

TidalOrgChart.title (required)
ReactNode

Required title value accepted by this exported component.

TidalOrgChart.description
ReactNode

Optional description value accepted by this exported component.

TidalOrgChart.detailAction
ReactNode

Optional detail action value accepted by this exported component.

TidalOrgChart.dir
"ltr" | "rtl" | undefined

Optional dir value accepted by this exported component.

TidalOrgChart.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalOrgChart.headingLevel
"h2" | "h3" | "h4" | "h5" | undefined

Optional heading level value accepted by this exported component.

TidalOrgChart.labels
Partial<{ tree: string; reportsTo: string; reports: string; noReports: string; noManager: string; empty: string; choose: string; invalid: string; profile: string; }> | undefined

Optional labels value accepted by this exported component.

TidalOrgChart.personItemProps
((person: TidalOrgPerson) => TidalTreeNode["itemProps"]) | undefined

Optional person item props value accepted by this exported component.

TidalOrgChart.personItemRef
((person: TidalOrgPerson) => Ref<HTMLDivElement> | undefined) | undefined

Optional person item ref value accepted by this exported component.

TidalOrgChart.treeRef
Ref<HTMLDivElement> | undefined

Optional tree ref value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas