shadcn.io is not affiliated with official shadcn/ui
Sankey Flow Diagram Features Block for React
A Sankey of an event router's flows: three sources, four destinations and curved bands whose width is the events they carry, with nodes you hover, focus or press to follow a stream.
Installation
Overview
A Sankey features section for React with Base UI. Three sources (browser events, server events, webhooks) sit on one side and four destinations (a warehouse, dashboards, alerts, an audit log) on the other, joined by twelve curved bands in the text colour whose width is the number of events each carries. Every node is a button: hover, focus or press one and the bands that touch it stay strong while the rest fade, and a sentence under the diagram says what it sends or receives. The bands are computed from one list of flows, so editing a number reshapes the diagram. Below md the diagram gives way to a table of the same flows. It's built from Guides and plain SVG, with CSS transitions, and it follows your theme. For data pipelines, event platforms and any feature where the weight of each stream is the story.
FAQ
How do I change the flows?
Edit FLOWS at the top of the file: each is a source, a destination and a number of millions of events. Add a source or destination to SOURCES or DESTINATIONS and use its id in a flow. Node heights, band widths, offsets and curves are all derived from those numbers by small functions, so nothing else needs editing. Every source's flows should add up to its volume, which they do by construction.
How do the nodes work?
Each node is a real button. Hovering or focusing it follows its flows; pressing it pins the highlight, and pressing it again lets go. A sentence under the diagram, announced politely to screen readers, says what the followed node sends or receives, such as "Warehouse receives 8M from Browser events, 6M from Server events and 3M from Webhooks".
How does a screen reader get the diagram?
The SVG is hidden from assistive technology. The nodes are two named lists of buttons with their daily volume, and a table of every flow sits in the page for screen readers: destinations as rows, sources as columns, with totals. It is the same table people see on a phone.
What replaces the diagram on a phone?
The table: four destination rows, three source columns and a total, in small type that fits at 320 pixels. The bands would be too thin to read there, so the facts move into the table instead of shrinking.
Related
- Pro
Pipeline Step Diagram Features
Diagrams and mapsA CI pipeline drawn as five stages joined by chevrons, each with its time and status, over a band that measures the pipeline's impact with rolling numbers.
- Pro
Architecture Flow Diagram Features
Diagrams and mapsA request path for an edge-routing layer: five hops on one wire with a dot travelling along it, the time each hop spends under it, and a latency-budget bar that sums them.
- Pro
Radial Hub Satellite Graph Features
Diagrams and mapsA hub with six tools around it joined by spokes that carry travelling dots, and a status list beside it: choosing a tool or hovering its row lights its spoke.
- Pro
Layered Stack Diagram Features
Diagrams and mapsA flat stack ladder for an app platform: five bars from interface to infrastructure, each a step wider, linked by hover and focus to a list of what sits in every layer.
- Pro
Split Integration Flow Hero
Diagrams and mapsA split hero for a metrics pipeline: the headline and a Shine Button beside a divider and a flow diagram in a hairline frame, with a closing band of three proof cells.
- Pro
Circular Orbit Layout Features
Diagrams and mapsA hub and six connections around a solid ring for an integration hub: hovering, focusing or tapping a node writes its title and sentence into the hub.