shadcn.io is not affiliated with official shadcn/ui
Venn Diagram Overlap Features Block for React
A three-circle Venn diagram for a segment builder: seven zones with head counts, one radio group, a caption that names the chosen zone with a link to create it, and three legend cells.
Installation
Overview
A Venn-diagram features section for React with Base UI. Three overlapping circles, Trial users, Power users and Admins, are drawn in SVG inside a framed figure and make seven zones, each with a count chip at its heart. Choosing a zone fills its exact shape in the diagram, and the caption under the figure reads it out ("Trial and Power: 980 users") beside a link to create that segment. Beneath the figure three cells in overshoot lines list each group as a description list: its total, how many are only in it and how many are in others too, all worked out from the seven counts. On a phone the figure shrinks to the width and the cells stack. It's built from Data List and Guides, with SVG masks and clips for the zones and your theme's tokens for every colour. For segmentation, audience overlap and any story told in sets that share members.
FAQ
How do I change the counts and the groups?
Edit REGIONS at the top of the file: each zone has an id (the letters of the groups it is in), a label for the caption, its count and the point where its chip sits. The three groups' totals, "only here" and "in others too" figures are summed from those seven counts, so they always agree with the diagram. GROUPS holds each group's name and sentence.
How is a zone's shape drawn?
Each zone is one of the circles, cut or clipped by the others: a zone that is only in one group is its circle with the other two masked out, a pairs-only zone is one circle clipped to another with the third masked out, and the middle is the three clips nested. Only the chosen zone is filled, so the diagram stays one drawing with one hairline per circle.
How do I use it with a keyboard?
The zones are one group of radio buttons: Tab puts focus on the chosen zone and the arrow keys move through the seven in reading order, choosing one as they go. Each chip's accessible name is the zone and its count ("Trial and Power: 980 users"), and the caption is a live output, so the choice is announced.
Where does Create segment go?
It is a plain link (href="#") in the caption: point it at your segment editor and pass the zone, since the zone's id is the chosen radio's value. The link has no asChild or render because it is not a button.
Related
- Pro
Quadrant Plot Two Axis Map Features
Diagrams and mapsA hairline plot for a prioritisation tool: six backlog ideas as dots on impact against effort, one radio group, with a panel beside it reading out the chosen idea's scores and verdict.
- Pro
Radar Chart Capability Trio Features
Metrics and chartsOne large radar of five axes with the previous release dashed and the latest run solid, three suite tabs that cross-fade the polygons, and a list of every axis score and how far it moved.
- Pro
Skill Tree Branch Graph Features
Diagrams and mapsA dependency tree of nine toggles for a modular SDK: switching a module on switches on what it needs, switching one off switches off what depends on it, and a counter and a bundle size follow.
- 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
Heatmap Density Grid Features
Metrics and chartsA 24 by 12 traffic density grid in a framed figure with a legend, three numbered callout cells, and the callouts described beside it, for a traffic observability tool.
- Pro
Vs Competitor Comparison Table Features
Proof and comparisonsAn eight-row comparison of a project suite with an unnamed typical tool, with real values, a monochrome check or dash, a count of where it leads and a Switch that shows only the rows that differ.