# Mermaid Venn Diagram Cheat Sheet

Overlapping sets, and the regions they share.

## The sets

A set is a name, and a label in brackets. A set with no label is drawn but not named.

```mermaid
venn-beta
  title Capability overlap
  set Core["Core renderer"]
  set Host["Host theme"]
  set Theme["Theme tokens"]
```

![A Venn diagram of three overlapping circles labelled Core renderer, Host theme and Theme tokens.](/diagrams/venn/sets.svg)

## The region they share

union names the overlap of two sets, or of three.

```mermaid
venn-beta
  title Capability overlap
  set Core["Core renderer"]
  set Host["Host theme"]
  union Core,Host["Shared surface"]
```

![A Venn diagram of two overlapping circles, Core renderer and Host theme, with the overlap labelled Shared surface.](/diagrams/venn/union.svg)

## The values behind them

A number after the set is its value, and the same number after a union is the value of the overlap.

```mermaid
venn-beta
  set Core["Core renderer"]:10
  set Host["Host theme"]:8
  union Core,Host["Shared surface"]:3
```

![A Venn diagram of two overlapping circles, Core renderer and Host theme, with the overlap labelled Shared surface, all three carrying numbers.](/diagrams/venn/values.svg)

## Draw it in Mernyx.

Open a .mmd file, move a node on the canvas, and the source comes with it. Native on macOS, no browser involved.
