---
name: tangram-design-system
description: The Tangram slide design system (flat coloured shapes that each mean one thing). Use when making slides, title cards, diagrams or thumbnails for a teaching video in the Tangram look, or when the user mentions "Tangram".
---

# Tangram design system

Tangram is a look for teaching videos that explain with flat coloured shapes. Each kind of thing in a lecture gets one shape and one colour and keeps them for the whole course, so a viewer who has seen two videos can read the third without a legend. Frames are 1920 x 1080.

**Best for:** Explainers where the viewer follows one request through a few parts.

## How to use it

1. Every slide is one 1920 × 1080 frame. Use the token values below (or link `tokens.css` from the zip) and never invent a colour, size or radius.
2. Load the fonts:
   ```html
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,800&family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;700&display=swap">
   ```
3. Pick the slide type that fits (see **Slides**) and follow its rules exactly. Pick one theme (Day or Night) for the whole video.
4. Before you finish, check: one idea per slide, all text inside the safe margin, nothing smaller than the `label` style.

## Voice

- Short, plain and a little playful: "One door, many servers". Say what the thing does before you say what it is called.
- The heading is one sentence and fits one line.
- Sentence case everywhere except `label`, which is uppercase.

## The shape language

- Circle, `yellow`: asks for something (client, user, browser).
- Triangle, `red`: decides or directs (load balancer, router, gateway). It points the way traffic flows.
- Square, `blue`: does the work (server, service, worker).
- Pill, `ink`: holds things in order (queue, log).
- `green` marks the one shape the slide is about. Only one shape per slide is green.
- Add a new role by adding a new shape, not a new colour.

## Colour

- The frame is `paper`. Use Day for most lectures and Night for a course that wants a dark frame; do not mix them in one video.
- Text and connecting lines are `ink`; supporting text is `ink-muted`; paths not taken are dashed `rule`.
- Shapes are flat fills with no outline, shadow or gradient. Text on a shape uses its `on-` colour (`on-blue`, `on-red`, `on-yellow`, `on-green`).
- `yellow` is a fill only. On Day it is too pale to read alone, so every yellow shape has a `label`.

## Type

- `display`, `heading` and `subhead` are Bricolage Grotesque at weight 800. `body` is DM Sans. `label` is DM Mono.
- Nothing on screen is smaller than `label` (28px).

## Layout

- Shapes sit on a 180px module in diagrams and pack edge to edge on title slides.
- Corners are `radius-none`. Round forms are whole circles, half-circles or quarter-circles (`radius-quarter`), never a slightly rounded square.
- Keep all text inside the `space-16` margin. Shapes may bleed off the right edge.

## Motion

- Shapes pop in at full size, 6 to 8 frames at 30fps, one per beat of narration. They slide along their lines to show a request moving.
- Between slides, shapes that appear on both stay on screen and move to their new place.

## Iconography

There are no icons. The shapes are the icons.

## Slides

### TitleSlide

Opens a lecture with its title beside a tangram: the shapes the lecture will use, packed into one figure.

- You provide: a section label, a title of at most two lines, one subtitle line.
- Build the tangram from the shapes that appear later in the lecture, on a 180px module, edges touching with no gaps. Squares are `blue`, triangles `red` or `yellow`, round cuts `green` or `red`, plus one or two `ink` blocks for weight.
- The title is `display` in `ink`; the label is `label` and the subtitle `body`, both in `ink-muted`.
- The tangram may bleed past the right margin. Text may not.
- When the video starts, the tangram comes apart and its pieces become the first diagram.

### DiagramSlide

Teaches one idea with flat shapes: circles ask, triangles decide, squares do the work.

- You provide: a section label, a one-line heading, the shapes with a `label` under each group, and one short note beside the shape the slide is about.
- Shape means role and never changes within a course: circle = client (`yellow`), triangle = decides or directs (`red`, pointing the way traffic flows), square = does work (`blue`), pill = queue (`ink`).
- Exactly one shape is `green`: the one the heading is about. Its line is solid `ink`, 10px. Paths not taken are dashed `rule`.
- Numbers inside shapes are `subhead` in the matching `on-` colour.
- Every group has a `label` below it. Yellow never appears without one.
- Shapes pop in at full size with no outline, no shadow and no gradient.

### CompareSlide

Sets two or three options side by side as solid colour tiles, each with a small shape figure, a name and two lines.

- You provide: a heading, two or three options (a name of up to three words, two short lines, and a figure made of three or four shapes), and one closing line.
- Tiles are 528px wide with `space-6` padding and `radius-none`. Use `blue`, `yellow`, `red` in that order; text and figures on each tile use the matching `on-` colour.
- The options are equals, so there are no numbers. For steps in order, number them and keep the tiles one colour.
- The closing line gives the default choice, in `body` in `ink-muted`.

## Tokens

### Colour

| token | Day | Night | usage |
| --- | --- | --- | --- |
| `--paper` | #eef0f3 | #14161c | The frame background. |
| `--paper-raised` | #ffffff | #20242e | A panel behind a worked example or a legend. |
| `--ink` | #14161c | #eef0f3 | All text, connecting lines and the ink shape, on paper and paper-raised. |
| `--ink-muted` | #555b66 | #a7aebb | Subtitles, captions and labels, on paper and paper-raised. |
| `--rule` | #767d89 | #737a87 | Dashed lines for paths not taken. Lines only. 3:1 on paper. |
| `--blue` | #2347d9 | #7890ff | Squares: things that do work (servers, services, workers). |
| `--red` | #ee4b35 | #ff6f59 | Triangles: things that decide or direct (balancers, routers, gateways). |
| `--yellow` | #f7c11e | #ffd23f | Circles: things that ask (clients, users). Fill only, never text or lines; on Day it is too pale to read alone, so a yellow shape always carries a label. |
| `--green` | #0c7f63 | #45cfab | The chosen one: the single shape the slide is about. One per slide. |
| `--on-blue` | #ffffff | #14161c | Text on a blue shape or tile. |
| `--on-red` | #14161c | #14161c | Text on a red shape or tile. |
| `--on-yellow` | #14161c | #14161c | Text on a yellow shape or tile. |
| `--on-green` | #ffffff | #14161c | Text on a green shape. |

### Type

Families: `display` "Bricolage Grotesque", "Arial Black", sans-serif · `body` "DM Sans", Helvetica, sans-serif · `mono` "DM Mono", Menlo, monospace

| style | family | size / line | weight | usage |
| --- | --- | --- | --- | --- |
| `display` | display | 136px / 1.03 | 800 | The lecture title. |
| `heading` | display | 72px / 1.1 | 800 | The one sentence a slide teaches. |
| `subhead` | display | 44px / 1.15 | 800 | Tile titles and numbers inside shapes. |
| `body` | body | 36px / 1.35 | 500 | Supporting lines. Two lines at most per block. |
| `label` | mono | 28px / 1.2 | 500 | Shape names and section labels. Smallest size allowed on screen. |

### Spacing and radius

| token | value | usage |
| --- | --- | --- |
| `--space-2` | 16px | Gap between a label and the line it names. |
| `--space-4` | 32px | Gap between a heading and its body text; padding inside small shapes. |
| `--space-6` | 48px | Padding inside blocks and tiles; gap between sibling tiles. |
| `--space-12` | 96px | Gap between the text column and the figure; the module of the shape grid. |
| `--space-16` | 128px | Safe margin on all four sides of the 1920 x 1080 frame. No text crosses it. |
| `--radius-none` | 0px | Squares, tiles and panels. Corners are never softened. |
| `--radius-quarter` | 180px | The quarter-circle cut: one corner of a 180px module rounded all the way. |
| `--radius-full` | 9999px | Circles and pills (queues). |
