Chord diagram
ProFlows between groups as ribbons around a ring: hover a group to isolate its chords, switch periods and every arc and ribbon morphs.
Live · keyboard ready
Team handoffs
- Build
- Go to market
- Insight
| From | Design | Product | Engineering | QA | Support | Sales | Data |
|---|---|---|---|---|---|---|---|
| Design | 48 | 132 | 8 | 6 | 10 | 12 | |
| Product | 61 | 181 | 20 | 30 | 26 | 38 | |
| Engineering | 44 | 70 | 168 | 36 | 8 | 52 | |
| QA | 5 | 15 | 149 | 14 | 0 | 4 | |
| Support | 10 | 66 | 141 | 39 | 44 | 18 | |
| Sales | 12 | 64 | 20 | 0 | 52 | 26 | |
| Data | 9 | 44 | 71 | 3 | 8 | 24 |
- Showing who exchanges the most with whom in both directions.
- Comparing flow patterns between two periods.
- Use sankey-flow for flows through ordered stages.
- Use network-graph when there are many nodes with sparse links.
Installation
Pro source and install commands unlock with a Pro plan.
example.tsx
import { ChordDiagram } from "@/components/arc/chord-diagram/chord-diagram"; const groups = [{ id: "design", label: "Design" }, { id: "eng", label: "Engineering" }, { id: "qa", label: "QA" }];const matrix = [ [0, 118, 6], [38, 0, 142], [4, 126, 0],]; export function Handoffs() { return <ChordDiagram groups={groups} matrix={matrix} label="Handoffs between teams" />;}ChordDiagram
Flows between groups as ribbons around a ring. Hover or focus a group to isolate its chords, read both directions of any ribbon, and switch datasets to morph every arc and ribbon.
PropTypeDefaultDescription
groupsRequired{ id: string; label: string; category?: string }[]–The groups around the ring, in order. A stable id keeps each arc across datasets.matrixRequirednumber[][]–Square matrix of flows: matrix[i][j] is the flow from groups[i] to groups[j]. The diagonal is ignored.labelRequiredstring–What flows. Names the chart for assistive technology.categories{ id: string; label: string }[]–Names and order of the categories. The first four take the series hues and a legend names them.formatValue(value: number) => string–Formats flows and totals.sizenumber380Largest diameter in pixels. The ring is redrawn at the rendered size on narrow screens.activestring | null–Controlled id of the isolated group.defaultActivestring | nullnullInitial isolated group when uncontrolled.onActiveChange(id: string | null) => void–Called when a group is isolated or released.legendbooleantrueShows groups with what each sends. Rows isolate on hover, focus, and click.emptyLabelstring"No flows yet"Shown when every flow is zero.classNamestring–Extra class on the root figure.- ArrowLeftorArrowRight
- Moves between groups and isolates the one in focus.
- ArrowDownorArrowUp
- Walks the focused group's ribbons, largest first.
- EnterorSpace
- Keeps the focused group isolated, or releases it.
- Escape
- Steps back from a ribbon to its group, then clears isolation.
- The ring is a focusable group with a description of its keys; legend rows are buttons with aria-pressed for isolation.
- Groups and ribbons are announced with both directions of flow through a polite live region.
- A visually hidden matrix table lists every flow from row to column.
- Arcs and ribbons interpolate their angles on one spring, so a new dataset swells and shifts every flow in place.
- The first reveal draws the ring, then pours the ribbons in a beat later.
- Isolation fades other ribbons and deepens the chosen ones; the tooltip glides and stays inside the ring.
- Reduced motion places the final geometry immediately.
- The ring redraws at its rendered size so labels keep their type size; labels hide on arcs too short to hold them, and the legend carries them.
- The legend wraps beside or under the ring and becomes a two-column grid on narrow widths.
- One path per group pair; geometry is painted imperatively during springs. Comfortable up to about 12 groups.
Notes for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Choose it for two-way flows among 4 to 10 groups: team handoffs, trade, migration, or referrals.
- Arcs are sized by what each group sends; the tooltip shows what it receives.
- Use categories to color families of groups instead of giving every group its own hue.
- Colors come from the shared --series-1 to --series-4 tokens in foundation.css: series 1 is the accent itself and series 2 to 4 rotate its hue, validated all-pairs for color vision deficiency across every accent in light and dark. Override the tokens on any ancestor to rebrand.
The full library index for assistants is at /llms.txt.