Skip to content
shadcn.io

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.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

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.

How does it fit on a phone?

The figure keeps its square shape and shrinks to the width; each count chip keeps a 44 pixel touch target around a smaller mark. The caption wraps with the link under the text, and the three cells stack, one per row.

Does the diagram mirror in right-to-left languages?

No: the circles keep their places, so the figure is dir="ltr". The header, the caption and the cells follow the page's direction, and the arrow on the link mirrors.

  • Pro

    A 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

    One 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

    A 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

    A 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

    A 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

    An 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.