shadcn.io is not affiliated with official shadcn/ui
Collaboration Ring Graph Team Block for React
Nine people of a hospital rota company on a ring joined by chords: pick one and their chords go strong, the people they work with stay in tone, and a list says who they work with most and for how many hours a week.
Installation
Overview
A collaboration graph for React with Base UI, for Teaselby, a hospital rota tool. A start-aligned header and a list sit at the start; a framed ring sits past a divider that meets the top rule at a + mark. Nine people are initials avatars on the ring, joined by chords that show who works with whom. Pick a person and their chords turn strong, weighted by the hours a week they spend with each person; the people they work with keep their tone and everyone else turns to an outline. The list is the content: a line names who they work with most, and each collaborator follows with their role and hours. On a phone the order is the copy, the ring, then the list. It's built from Avatar and Guides, with CSS transitions and your theme's tokens for every colour. For team pages that show collaboration, not hierarchy.
FAQ
How do I change the people and who works with whom?
Edit PEOPLE and EDGES at the top of the file. A person is an id, a name and a role; the order of PEOPLE is the order around the ring, from the top, clockwise, and the positions are worked out for any count. An edge is two ids and the hours a week they spend working together; its chord is drawn thicker with more hours. The hours are example data: use any measure you can stand behind.
How do I use it with a keyboard and a screen reader?
Each person on the ring is a radio button in a group named "Pick a person to see who they work with", so Tab moves into the ring and the arrow keys move around it, picking as they go. Each radio is named with the person's full name and role. The chords are a decoration and are hidden from assistive technology; the list beside the ring holds the same facts as text, and a polite line says who the picked person works with most.
What does picking a person change?
Their chords go from a faint hairline to a strong line, wider for more hours; the avatars of the people they work with stay in tone and everyone else turns to an outline with muted text. The picked person is filled in with a ring. The list under the heading re-sorts to their collaborators, most hours first.
How does it fit on a phone?
The ring scales with the screen, so the nine avatars sit on it at 320 pixels and up; below the ring comes its caption and then the list, under a hairline. Every list row has the same height and the list keeps room for four rows, so picking someone never changes the block's height, although the rows re-order.
Why doesn't the ring mirror in right-to-left languages?
A ring graph is a diagram, not text, so it keeps its own direction and the people stay where they are; the copy, the list and the figures around it follow the page direction. The first names on the ring are set left to right, the way a name in a diagram usually is.
Related
- Pro
Tree View Org Chart Team
Leaders and org chartsA split org chart for a ride-share fleet: copy, an Expand all button and three figures at the start, and a working tree of twenty-two people at the end, with a band that names the picked person's manager and reports.
- Pro
Drill-Down Org Chart Team
Leaders and org chartsA claims desk as a drill-down in a framed figure of three columns: pick a head of function, then a team lead, and each pick fills the next column; on a phone one list shows at a time under a breadcrumb that steps back.
- Pro
Squad Matrix Team
Leaders and org chartsSix squads of a grocery loyalty app as a captioned table: a row per squad with its mission, a column per function, and in each cell the person who covers it as an initials avatar and a name, or a dash.
- Pro
Matching Diagram Mentors Team
Learning and mentoringA framed matching diagram for a skills marketplace: six tradespeople in a column at the start, six learners at the end in another order, a hairline curve joining each pair, and the pair you hover, focus or press kept while the rest recede.
- Pro
Time Zone Axis Team
Hours and placesTen people of a remote-first payroll company laid along an axis of UTC offsets, each office with its avatars, a live local time and a shaded band where it is working time, over six cells that list the same zones.
- Pro
Advisory Board Table Team
Leaders and org chartsSeven advisors of a climate-risk model company in a captioned table from rail to rail: an initials avatar and a name, their role and firm, their specialty and the year they began advising.