shadcn.io is not affiliated with official shadcn/ui
Venn Diagram Overlap Features Block for Radix UI
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 Radix 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
- Quadrant Plot Two Axis Map FeaturesDiagrams and maps
- Radar Chart Capability Trio FeaturesMetrics and charts
- Skill Tree Branch Graph FeaturesDiagrams and maps
- Radial Hub Satellite Graph FeaturesDiagrams and maps
- Heatmap Density Grid FeaturesMetrics and charts
- Vs Competitor Comparison Table FeaturesProof and comparisons