# Decks ## Connect Decks is a remote MCP server (Streamable HTTP, OAuth sign-in with Google or an email code): `https://decks.lol/mcp` - Claude (web and desktop): Settings → Connectors → Add custom connector, paste the URL. - Claude Code: `claude mcp add --transport http decks https://decks.lol/mcp`, then `/mcp` to sign in. - Cursor: `~/.cursor/mcp.json` or `.cursor/mcp.json`: `{"mcpServers":{"decks":{"url":"https://decks.lol/mcp"}}}` - VS Code: `.vscode/mcp.json`: `{"servers":{"decks":{"type":"http","url":"https://decks.lol/mcp"}}}` Call describe_format before writing a deck. Workflow: create_deck or get_deck → write_files → preview_deck (screenshots) → publish_deck. --- # decks.lol deck format A deck is a small set of files. You write them with write_files; decks.lol compiles and renders them to a static page when the deck is previewed or published. ``` deck.json title, theme, component library version, slide order slides/.mdx one slide per file, named for its content (lowercase, e.g. slides/pricing.mdx) components/*.tsx your own React components (optional) style.css styling on top of the theme (optional) ``` A deck holds up to 200 files of 256 KB each. ## deck.json ```json { "title": "Quarterly review", "theme": "ink@1", "library": 1, "slides": [ { "file": "slides/cover.mdx" }, { "file": "slides/risks.mdx", "branches": [ { "id": "pricing", "label": "Pricing risk", "slides": [{ "file": "slides/pricing.mdx" }] }, { "id": "hiring", "label": "Hiring risk", "slides": [{ "file": "slides/hiring.mdx" }, { "file": "slides/hiring-plan.mdx" }] } ] }, { "file": "slides/next-steps.mdx" } ] } ``` The top-level `slides` are the main line and play in order. `branches` are optional "go deeper" paths off one slide. Viewers step into a branch through a `` link on the slide and come back with Esc, ↑ or a swipe down. Give a link a `hotkey` (`ArrowDown`, a digit or a lowercase letter other than c and f, which the player uses) to let viewers follow it from the keyboard; `ArrowDown` also maps to a swipe up on phones. The player does not advertise hotkeys, so show the key in the slide (e.g. "Pricing risk ↓"). The progress pills mark each branch with a dot under its slide. Use them for details, evidence and appendices so the main line stays short. A slide can have several branches, and slides inside a branch can have their own branches, so a deck is a tree. - `id` (lowercase, -, _) names the branch for links and the URL. It defaults to the first slide's file name. - `label` names the branch in the player bar while viewers are inside it. It defaults to the first slide's heading; set it, short (2-4 words). - `"deeper": [...]` is shorthand for one branch without an id or label. - Each slide file appears once in deck.json. Slides can also have a `label`, shown in the back button of branches off them. - A slide's file name without .mdx is its id: links (`#pricing`), `[data-slide-id]` selectors and the owner's comments all point at it. Name a slide for its content, not its position, and keep its file name once it exists. To reorder or insert slides, change deck.json only. At the end of a branch the viewer returns to its slide when that slide has several branches, and otherwise moves on to the slide after that one. Every branch needs a `Pricing risk` on its parent slide, or viewers cannot reach it (write_files, preview_deck and publish_deck warn about branches nothing links to); a slide with several can work as a menu. Plain links to `#` or `#` work too. ## Slides: MDX Each slide file is MDX: Markdown plus JSX. Markdown headings, paragraphs, lists, links, images, code, tables (GFM) and blockquotes are styled by the theme; that styling applies only to Markdown, not to HTML you write in JSX or in components. The built-in components below are available in every slide without importing. Import your own components with a relative path: `import { Chart } from "../components/Chart.tsx"`. Every component in components/ whose export name starts with a capital letter is also available without importing. ```mdx Q3 ## Revenue tripled Mostly from **self-serve** upgrades. ``` Leave blank lines around Markdown that sits inside JSX, as above, or it is treated as plain text. ## Built-in components - `…`: Title slide: a big h1 and a muted subtitle. Default align="end". - `
…
`: Centers its content both ways and fills the slide. - `…`: Vertical stack with a gap. Default gap="m". - `…`: Side by side columns, one per child. Stacks vertically in portrait. Default align="start". - `…`: Responsive grid of equal cells; as many columns fit as the minimum width allows. - `…`: One big sentence in the display font. - `…`: Small uppercase label in the accent color, above a heading. - `…`: Text in the theme's muted color. - ``: Big number with a caption. - `…`: Pull quote with an optional attribution. - ``: Image or video (.mp4, .webm, .mov). Host files with add_media_from_url, or create_media_upload for local files. Default fit="cover". - ``: Iframe embed (YouTube, Figma, ...). - ``: Raw HTML, sanitized like the rest of the deck. - `…`: Button, or inline link with `inline`, that opens a branch of deck.json or a slide by name. The build fails if `to` matches nothing. `?` marks an optional prop, `a|b` its choices and `=` its default. All built-ins also take `className` and `style`. Props are checked when the deck builds: an unknown prop, a wrong value or a missing required prop is a build problem. Call describe_component for a component's props with descriptions, examples, the exact HTML it renders and its default CSS, before restyling it in style.css. ## Your own components components/*.tsx files are React function components written in TypeScript. They run once, on decks.lol's servers, when the deck builds, and only their HTML output reaches viewers. So: - Use props, loops, conditionals, computed values and composition freely. - Hooks that need a browser (useEffect, useState updates, event handlers like onClick) do nothing; nothing re-renders after the build. - Imports: `react`, `decks` (the built-ins, e.g. `import { Stat } from "decks"`) and other files in components/. No npm packages, no network, no file access. - Inline `` is the way to draw charts and diagrams. - The output is sanitized:
{data.map((d) => (
{d.label}
))}
); } ``` ## Code Fenced code blocks with a language are syntax highlighted when the deck builds, in the theme's colors: ```tsx, ```python, ```bash, ... Supported: bash, c, c++, cjs, console, cpp, cs, csharp, css, diff, docker, dockerfile, go, gql, graphql, html, java, javascript, js, json, jsonc, jsx, kotlin, kt, markdown, md, mdx, mjs, php, py, python, rb, rs, ruby, rust, scss, sh, shell, shellscript, sql, svg, swift, toml, ts, tsx, typescript, xml, yaml, yml, zsh. Fences without a language, and unknown languages, stay plain. A component gets the same highlighting by rendering `
`.

Mark lines with a comment at the end of the line (the comment is removed from what viewers see):
- `// [!code highlight]` highlights the line
- `// [!code ++]` and `// [!code --]` show it as an added or removed line
- `// [!code focus]` dims every other line
- `// [!code word:max]` highlights the word max from that line to the end of the block (`word:max:2` for just 2 lines)
Use the language's own comment syntax (`#` in Python and shell).

Token colors are CSS variables you can override in style.css: `--shiki-token-keyword`, `-string`, `-comment`, `-function`, `-constant`, `-parameter`, `-punctuation`, plus `--code-highlight`, `--code-inserted` and `--code-deleted` for line backgrounds.

## Layout and sizing

Every slide is a size container. The page shows a 16:9 stage on desktop and full-screen portrait "stories" on phones; the same slide must work in both.

- Size things in `cqmin` (1cqmin = 1% of the slide's smaller side) or `em`. Base text is 3.6cqmin landscape and 4.6cqmin portrait, so `em` scales automatically.
- Use `@container (orientation: portrait) { ... }` in style.css for phone-specific layout.
- Content sits in `.slide-content`, a centered flex column with padding. Use `` or `position: absolute; inset: 0` for full-bleed visuals.

## style.css

Applied on top of the theme. Every slide is `
` holding `
`. Theme colors and fonts are CSS variables: `--bg`, `--fg`, `--muted`, `--accent`, `--surface`, `--font-display`, `--font-body`. Built-ins render elements with `d-` classes (`.d-cover`, `.d-stat`, ...); describe_component shows each one's HTML and default CSS. Markdown output carries the class `md` (e.g. `h2.md`, `ul.md`). Class names starting with `player-` belong to the player; don't use them. Target one slide with `[data-slide-id="revenue"]`. Google Fonts can be loaded with @import. ## Lints Every build also checks the deck against these rules. Findings come back with the rule id in brackets, e.g. `slides/risks.mdx: [branch-target-missing] does not match a branch id or slide name in deck.json`. An `error` fails the build, so the deck can't be previewed or published until it's fixed; a `warn` is listed under warnings. - `branch-target-missing` (error): A link must point at a branch id or slide name in deck.json. - `branch-unlinked` (warn): Every branch needs a link on its parent slide, or viewers can't reach it. - `slide-selector-missing` (error): A [data-slide-id] selector in style.css must name a slide in deck.json. A slide's id is its file name, so renaming the file silently drops the styles scoped to it. - `style-overrides` (warn): A slide should not carry many one-off styles: inline style props plus style.css declarations scoped to it with [data-slide-id]. Move repeated looks into a shared class in style.css or a component. Options: `max`=5 (Most overrides one slide may have, counting each inline style property and each scoped declaration). - `fixed-units` (warn): Size things in style.css with cqmin or em, not px, so one slide works on the 16:9 stage and on phone stories. Rules that only style SVG content are skipped, since px there are viewBox units. Options: `maxPx`=2 (px values up to this size are allowed, for hairlines). Change a rule's severity or options with `"lint"` in deck.json, only when the user wants a different house style: ```json { "lint": { "style-overrides": ["warn", { "max": 5 }], "fixed-units": "off" } } ``` Every rule, with examples that pass and fail: https://decks.lol/docs/lints.md ## Themes (fonts and colors only) - `paper@1` (Paper): display 'Fraunces', body 'Inter', bg #f6f1e7, fg #1d1a16, accent #c2410c, muted #6f675c, surface #ebe3d3 - `ink@1` (Ink): display 'Space Grotesk', body 'Inter', bg #0e0f12, fg #f2f2f0, accent #7dd3fc, muted #9a9ca3, surface #1b1d22 - `mono@1` (Mono): display 'IBM Plex Mono', body 'IBM Plex Sans', bg #ffffff, fg #111111, accent #2563eb, muted #6b6b6b, surface #f1f1f1 - `bold@1` (Bold): display 'Archivo Black', body 'Archivo', bg #ffd60a, fg #111111, accent #111111, muted #4a4115, surface #f5c800 - `forest@1` (Forest): display 'Instrument Serif', body 'DM Sans', bg #13241c, fg #ecf2ea, accent #e9c46a, muted #9db3a5, surface #1c3328 Theme ids are versioned (`paper@1`). A released version never changes, so a deck looks the same however often it is republished; restyling a theme ships a new version. Keep a deck's existing theme id unless the user asks for a new look. A bare name such as `paper` means version 1, and a deck with no theme uses `paper@1`. ## Component library versions The built-in components, the Markdown styling and `.slide-content` layout ship together as the component library, pinned per deck by `"library"` in deck.json (latest: 1). A released version never changes, so republishing never restyles a deck or breaks its slides; improvements ship as a new version. Keep a deck's existing version unless the user asks to upgrade, and check its slides with preview_deck after upgrading. No `"library"` means version 1. The list above describes the latest version; pass `library` to describe_component for an older one. Each version is downloadable as source (React components, prop specs, CSS, docs and the render bundle): `https://decks.lol/library/1/decks-library-1.zip`, every version listed at `https://decks.lol/library/index.json`. ## Workflow 1. create_deck, or get_deck to read an existing one. 2. write_files with the files you change. Every write is checked: the result lists build problems with file and line. 3. preview_deck builds the draft and returns screenshots: a contact sheet of every slide on desktop and phone, or full-size shots of the slides you name. Look at them and fix what looks wrong; text that overflows or collides only shows up here. Pass viewports to check the edges: a small phone (iphone-se), a big one (iphone-16-pro-max), a tablet (ipad-landscape gets the desktop player, ipad-portrait gets stories) and a 4:3 projector (projector-4-3). 4. publish_deck makes it public. Publishing refuses decks with build problems. unpublish_deck takes it offline again and keeps the draft. --- # Decks MCP tools decks.lol hosts responsive slide decks written as files: deck.json, MDX slides and React components. Call describe_format before writing deck content, and describe_component before restyling a built-in component. ## whoami Who am I. Show the decks.lol account this connection acts as. Hints: readOnly: true No inputs. ## describe_format Describe the deck format. How a deck is written: deck.json, MDX slides, built-in components, your own React components, sizing rules, themes and CSS hooks. Read this before creating or editing a deck. Hints: readOnly: true No inputs. ## describe_component Describe built-in components. Full reference for built-in components: every prop with type, default and description, examples with the exact HTML they render, and the default CSS to override in style.css. Pass names, or leave them out for all. Describes the latest component library unless you pass the deck's "library" version. Hints: readOnly: true | Input | Type | Description | | --- | --- | --- | | `names` | `string[]` | Built-in component names, e.g. ["Stat", "Columns"] | | `library` | `integer` | Component library version from deck.json "library" (latest: 1) (≥ -9007199254740991, ≤ 9007199254740991) | ## list_decks List decks. List the decks you own on decks.lol, most recently edited first. Hints: readOnly: true No inputs. ## get_deck Get deck. Read a deck's current draft: every file (deck.json, slides, components, style.css), plus publish status and links. Hints: readOnly: true | Input | Type | Description | | --- | --- | --- | | `slug` (required) | `string` | The deck's slug, from list_decks | ## create_deck Create deck. Create a new deck. Pass files to fill it in one step (must include deck.json and every slide it lists); otherwise it starts from a short starter deck. The draft is private until publish_deck. Hints: readOnly: false, destructive: false, idempotent: false | Input | Type | Description | | --- | --- | --- | | `title` (required) | `string` | The deck's title; also used for its URL (at least 1 characters) | | `files` | `{ [key: string]: string }` | Map of path to full file content: deck.json, style.css, slides/.mdx, components/.tsx. See describe_format. | ## write_files Write files. Create, replace or delete files in a deck's draft. Send whole file contents; null deletes a file. The deck is built after every write and build problems are returned with file and line. Saved drafts are versioned in the deck's history; visitors see changes only after publish_deck. Hints: readOnly: false, destructive: true, idempotent: true | Input | Type | Description | | --- | --- | --- | | `slug` (required) | `string` | The deck's slug, from list_decks | | `files` (required) | `{ [key: string]: string \| null }` | Map of path to new full content, or null to delete the file. Files you leave out are unchanged. | | `reason` | `string` | Short note for the deck's history | ## preview_deck Preview deck. Build the current draft and look at it. Returns build problems (file, line, message) or screenshots: by default a contact sheet of every slide for desktop (16:9) and phone (stories), labelled with slide ids; pass slides to get full-size screenshots of specific slides as a viewer sees them, and viewports to check other devices (presets like iphone-se, iphone-16-plus, ipad-landscape, projector-4-3, or a custom size). Check your work with this after writing files. Hints: readOnly: true, openWorld: true | Input | Type | Description | | --- | --- | --- | | `slug` (required) | `string` | The deck's slug, from list_decks | | `slides` | `string[]` | Slide ids (file names without .mdx, as labelled on the contact sheet) to screenshot at full size (at most 8 items) | | `viewports` | `("desktop" \| "desktop-1080p" \| "projector-4-3" \| "ipad-landscape" \| "ipad-portrait" \| "phone" \| "iphone-se" \| "iphone-16" \| "iphone-16-plus" \| "iphone-16-pro-max" \| "pixel-9" \| { width: integer, height: integer, scale?: number, mobile?: boolean })[]` | Devices to render. Presets: desktop, desktop-1080p, projector-4-3, ipad-landscape, ipad-portrait, phone, iphone-se, iphone-16, iphone-16-plus, iphone-16-pro-max, pixel-9. Defaults to ["desktop","phone"]. (at least 1 items, at most 4 items) | ## publish_deck Publish deck. Publish the current draft so anyone with the deck's view URL sees it. Hints: readOnly: false, destructive: false, idempotent: true, openWorld: true | Input | Type | Description | | --- | --- | --- | | `slug` (required) | `string` | The deck's slug, from list_decks | ## unpublish_deck Unpublish deck. Take a published deck offline: its view URL, embeds and cover image stop working. The draft, history and comments are kept, and publish_deck puts it back. Hints: readOnly: false, destructive: true, idempotent: true, openWorld: true | Input | Type | Description | | --- | --- | --- | | `slug` (required) | `string` | The deck's slug, from list_decks | ## list_comments List comments. Comments the owner pinned on slides while viewing the draft deck. Each has the slide file, the point it was pinned at (x, y as % of the slide from the top left), the text the owner selected if any (selected), and the note. Open comments come with a screenshot of each slide, the pins drawn on it and numbered by comment id. The pin shows what the comment is about and roughly where the change belongs: follow that intent, but make the change fit the slide's layout and look good rather than placing it at the exact point. A comment with newSlideAfter instead of file asks for a new slide right after that one, its point placed on the empty new slide; the comments sharing a newSlideAfter describe one slide. Its screenshot is the slide before it, for style. Write the new slide under a name for its content, add it to deck.json after that slide, and leave the other slides' file names alone. Make the edits with write_files, check them with preview_deck, then mark each comment done with resolve_comment. Hints: readOnly: true | Input | Type | Description | | --- | --- | --- | | `slug` (required) | `string` | The deck's slug, from list_decks | | `includeResolved` | `boolean` | Also return resolved comments, default false | ## resolve_comment Resolve comment. Mark a comment from list_comments as addressed, with a short note on what you changed (or why you didn't). The owner sees the note in the deck's comments panel. Hints: readOnly: false, destructive: false, idempotent: true | Input | Type | Description | | --- | --- | --- | | `slug` (required) | `string` | The deck's slug, from list_decks | | `id` (required) | `integer` | Comment id from list_comments (≥ -9007199254740991, ≤ 9007199254740991) | | `note` (required) | `string` | What you changed, in a sentence (at least 1 characters, at most 4000 characters) | ## add_media_from_url Add media from URL. Copy an image (png, jpeg, gif, webp, svg, avif) or video (mp4, webm) up to 25 MB from a public URL into the deck's media storage. Returns a /media/... path to use as src in or . For a local file, use create_media_upload. Hints: readOnly: false, destructive: false, idempotent: true, openWorld: true | Input | Type | Description | | --- | --- | --- | | `slug` (required) | `string` | The deck's slug, from list_decks | | `url` (required) | `string` | Public http(s) URL of the file | ## create_media_upload Upload media file. Get a URL to upload a local image (png, jpeg, gif, webp, svg, avif) or video (mp4, webm) up to 25 MB into the deck's media storage, e.g. a file on the user's machine or one you generated. Send the raw bytes with an HTTP PUT, such as `curl -sS -T photo.jpg ''`; the response is JSON with the /media/... path to use as src in , or CSS url(). The URL works for several files until it expires. Use add_media_from_url instead when the file is already online. Hints: readOnly: false, destructive: false, idempotent: false | Input | Type | Description | | --- | --- | --- | | `slug` (required) | `string` | The deck's slug, from list_decks | ## list_feature_requests List feature requests. Feature requests on the public decks.lol roadmap (https://decks.lol/roadmap), most upvoted first, with status and whether you already voted. Check this before request_feature so you upvote an existing request instead of adding a duplicate. Hints: readOnly: true No inputs. ## request_feature Request a feature. Add a feature request to the public decks.lol roadmap (https://decks.lol/roadmap) when the user asks for something decks.lol can't do yet. Call list_feature_requests first: if a request already covers it, use upvote_feature_request instead. The title and description are public, so write them about the feature, not the user or their deck. Your vote is added automatically. Hints: readOnly: false, destructive: false, idempotent: false | Input | Type | Description | | --- | --- | --- | | `title` (required) | `string` | Short public title, e.g. "Speaker notes in presenter view" (at least 3 characters, at most 120 characters) | | `description` (required) | `string` | Public description of the feature and the problem it solves (at least 10 characters, at most 2000 characters) | | `note` | `string` | Private context for the decks.lol team: what the user is trying to do and why. Never shown publicly. (at most 2000 characters) | ## upvote_feature_request Upvote a feature request. Add the user's vote to a feature request on the decks.lol roadmap. Voting again only updates the private note. Visitors see an anonymous avatar, never who voted. Hints: readOnly: false, destructive: false, idempotent: true | Input | Type | Description | | --- | --- | --- | | `id` (required) | `integer` | The feature request's id, from list_feature_requests (≤ 9007199254740991) | | `note` | `string` | Private context for the decks.lol team: what the user is trying to do and why. Never shown publicly. (at most 2000 characters) | ## remove_feature_vote Remove a feature vote. Take back the user's vote on a feature request. Hints: readOnly: false, destructive: true, idempotent: true | Input | Type | Description | | --- | --- | --- | | `id` (required) | `integer` | The feature request's id, from list_feature_requests (≤ 9007199254740991) | --- # Decks MCP prompts ## address_comments Work through the open comments on a deck - `slug` (required): The deck's slug --- # Decks MCP resources ## deck `decks://{slug}` (application/json) A deck's current draft: every file (deck.json, slides, components, style.css), plus publish status and links. Same content as get_deck. --- # Decks built-in components Built-ins work in every slide without an import. Props are checked when the deck builds. Every component also takes `className` and `style`. ## Title slide: a big h1 and a muted subtitle. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `align` | "start" \| "center" \| "end" | "end" | Vertical position of the content | | `children` | MDX content | | Markdown: a `#` heading and a short paragraph | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx # Quarterly review October 2026 ``` Renders: ```html

Quarterly review

October 2026

``` Default CSS (style.css overrides it): ```css .d-cover { display: flex; flex-direction: column; gap: 2.4cqmin; flex: 1; justify-content: flex-end; } .d-cover[data-align="start"] { justify-content: flex-start; } .d-cover[data-align="center"] { justify-content: center; } .d-cover h1 { font-size: 3em; } .d-cover p { color: var(--muted); font-size: 1.1em; } ``` ##
Centers its content both ways and fills the slide. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | MDX content | | Anything | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx
## One idea
``` Renders: ```html

One idea

``` Default CSS (style.css overrides it): ```css .d-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4cqmin; flex: 1; text-align: center; } ``` ## Vertical stack with a gap. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `gap` | "s" \| "m" \| "l" | "m" | Space between children | | `children` | MDX content | | Anything | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx Q3 ## Revenue tripled ``` Renders: ```html

Q3

Revenue tripled

``` Default CSS (style.css overrides it): ```css .d-stack { display: flex; flex-direction: column; gap: 2.4cqmin; min-width: 0; } .d-stack[data-gap="s"] { gap: 1.2cqmin; } .d-stack[data-gap="l"] { gap: 5cqmin; } ``` ## Side by side columns, one per child. Stacks vertically in portrait. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `ratio` | string | "1:1" | Relative column widths, like "2:1" or "1:1:1" | | `align` | "start" \| "center" \| "end" | "start" | Vertical alignment of the columns | | `children` | MDX content | | One child per column | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx ## Revenue tripled ``` Renders: ```html

Revenue tripled

3.1×
year over year
``` Default CSS (style.css overrides it): ```css .d-columns { display: grid; grid-template-columns: var(--d-columns); gap: 5cqmin; align-items: start; min-height: 0; } .d-columns[data-align="center"] { align-items: center; } .d-columns[data-align="end"] { align-items: end; } .d-columns > * { min-width: 0; } @container (orientation: portrait) { .d-columns { grid-template-columns: 1fr; gap: 4cqmin; } } ``` ## Responsive grid of equal cells; as many columns fit as the minimum width allows. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `min` | string | "24cqmin" | Minimum cell width, a CSS length | | `children` | MDX content | | One child per cell | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx ``` Renders: ```html
12
teams
4.8
rating
99%
uptime
``` Default CSS (style.css overrides it): ```css .d-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--d-grid-min), 100%), 1fr)); gap: 3cqmin; } ``` ## One big sentence in the display font. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | MDX content | | A short sentence | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx Ship the smallest thing that teaches you something. ``` Renders: ```html
Ship the smallest thing that teaches you something.
``` Default CSS (style.css overrides it): ```css .d-statement { font-family: var(--font-display); font-size: 2.4em; font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; max-width: 18em; } .d-statement p { max-width: none; } ``` ## Small uppercase label in the accent color, above a heading. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | MDX content | | A few words | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx Q3 results ``` Renders: ```html

Q3 results

``` Default CSS (style.css overrides it): ```css .d-kicker { color: var(--accent); font-size: 0.7em; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; } ``` ## Text in the theme's muted color. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | MDX content | | Anything | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx Source: internal survey, n=412 ``` Renders: ```html
Source: internal survey, n=412
``` Default CSS (style.css overrides it): ```css .d-muted { color: var(--muted); } ``` ## Big number with a caption. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `value` | MDX content | required | The number or short value | | `label` | MDX content | | Caption under the value | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx ``` Renders: ```html
3.1×
year over year
``` Default CSS (style.css overrides it): ```css .d-stat { margin: 0; display: flex; flex-direction: column; gap: 0.2em; } .d-stat strong { font-family: var(--font-display); font-size: 2.8em; line-height: 1; letter-spacing: -0.03em; color: var(--accent); } .d-stat figcaption { color: var(--muted); font-size: 0.8em; } ``` ## Pull quote with an optional attribution. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `by` | MDX content | | Who said it | | `children` | MDX content | | The quote | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx It replaced three tools for us. ``` Renders: ```html
It replaced three tools for us.
A customer
``` Default CSS (style.css overrides it): ```css .d-quote { margin: 0; display: flex; flex-direction: column; gap: 1em; } .d-quote blockquote { border: 0; padding: 0; font-family: var(--font-display); font-size: 1.7em; line-height: 1.2; max-width: 24em; } .d-quote blockquote::before { content: "\201C"; display: block; height: 0.5em; color: var(--accent); font-size: 2em; line-height: 0.6; } .d-quote figcaption { color: var(--muted); font-size: 0.85em; } ``` ## Image or video (.mp4, .webm, .mov). Host files with add_media_from_url, or create_media_upload for local files. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `src` | string | required | Image or video URL, or a /media/... path | | `alt` | string | "" | Alt text for images | | `fit` | "cover" \| "contain" | "cover" | cover crops to fill, contain shows the whole file | | `caption` | MDX content | | Caption over the bottom edge | | `bleed` | boolean | false | Fill the whole slide edge to edge; write the bare attribute `bleed` | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx ``` Renders: ```html
Revenue chart
Revenue by month
``` ```mdx ``` Renders: ```html
The team
``` Default CSS (style.css overrides it): ```css .d-media { position: relative; margin: 0; min-height: 0; flex: 1; overflow: hidden; border-radius: 1cqmin; background: var(--surface); } .d-media :is(img, video) { display: block; width: 100%; height: 100%; object-fit: cover; } .d-media[data-fit="contain"] { background: transparent; } .d-media[data-fit="contain"] :is(img, video) { object-fit: contain; } .d-media figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 8cqmin 4cqmin 3cqmin; color: #fff; font-size: 0.75em; background: linear-gradient(transparent, rgb(0 0 0 / 0.6)); } .d-bleed { position: absolute; inset: 0; border-radius: 0; } ``` ## Iframe embed (YouTube, Figma, ...). | Prop | Type | Default | Description | | --- | --- | --- | --- | | `src` | string | required | URL of the page to embed | | `title` | string | "Embedded page" | Accessible title of the frame | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx ``` Renders: ```html ``` Default CSS (style.css overrides it): ```css .d-embed { flex: 1; width: 100%; min-height: 30cqmin; border: 0; border-radius: 1.2cqmin; background: var(--surface); } ``` ## Raw HTML, sanitized like the rest of the deck. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `html` | string | required | HTML markup | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx ``` Renders: ```html
Show the math2 + 2 = 4
``` Default CSS (style.css overrides it): ```css .d-html { flex: 1; min-height: 0; } ``` ## Button, or inline link with `inline`, that opens a branch of deck.json or a slide by name. The build fails if `to` matches nothing. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `to` | string | required | A branch id or slide name from deck.json | | `children` | MDX content | | Button label; defaults to `to` | | `inline` | boolean | false | Render as an underlined link inside running text instead of a button; write the bare attribute `inline` | | `hotkey` | "0" \| "1" \| "2" \| "3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" \| "ArrowDown" \| "a" \| "b" \| "d" \| "e" \| "g" \| "h" \| "i" \| "j" \| "k" \| "l" \| "m" \| "n" \| "o" \| "p" \| "q" \| "r" \| "s" \| "t" \| "u" \| "v" \| "w" \| "x" \| "y" \| "z" | | Key that follows this link while its slide is showing: `ArrowDown` (also a swipe up on phones), a lowercase letter or a digit. Keys the player uses (arrows, Esc, Space, Page Up/Down, f, c) are not allowed. Show the key in the slide yourself | | `className` | string | | Extra classes to target from style.css | | `style` | style object | | Inline styles | ```mdx Pricing risk ``` Renders: ```html Pricing risk ``` ```mdx pricing risk ``` Renders: ```html pricing risk ``` ```mdx Pricing risk ↓ ``` Renders: ```html Pricing risk ↓ ``` Default CSS (style.css overrides it): ```css .d-branch { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.5em; padding: 0.45em 1em; border: 2px solid var(--accent); border-radius: 999px; color: var(--fg); font-weight: 600; text-decoration: none; cursor: pointer; } .d-branch::after { content: "↓"; color: var(--accent); } .d-branch:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); } .d-branch-inline { display: inline; padding: 0; border: 0; border-radius: 0; font-weight: inherit; color: inherit; text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, var(--fg) 40%, transparent); } .d-branch-inline::after { content: none; } .d-branch-inline:hover { background: none; text-decoration-color: var(--accent); } ``` --- # Decks themes A theme sets a deck's fonts and colors: `"theme": "paper@1"` in deck.json. New decks start on `paper@1`. | Id | Name | Display font | Body font | bg | fg | muted | accent | surface | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `paper@1` | Paper | 'Fraunces', Georgia, serif | 'Inter', system-ui, sans-serif | #f6f1e7 | #1d1a16 | #6f675c | #c2410c | #ebe3d3 | | `ink@1` | Ink | 'Space Grotesk', system-ui, sans-serif | 'Inter', system-ui, sans-serif | #0e0f12 | #f2f2f0 | #9a9ca3 | #7dd3fc | #1b1d22 | | `mono@1` | Mono | 'IBM Plex Mono', ui-monospace, monospace | 'IBM Plex Sans', system-ui, sans-serif | #ffffff | #111111 | #6b6b6b | #2563eb | #f1f1f1 | | `bold@1` | Bold | 'Archivo Black', system-ui, sans-serif | 'Archivo', system-ui, sans-serif | #ffd60a | #111111 | #4a4115 | #111111 | #f5c800 | | `forest@1` | Forest | 'Instrument Serif', Georgia, serif | 'DM Sans', system-ui, sans-serif | #13241c | #ecf2ea | #9db3a5 | #e9c46a | #1c3328 | Every theme sets the CSS variables `--bg`, `--fg`, `--muted`, `--accent`, `--surface`, `--font-display`, `--font-body`. Use them in style.css and components, or override them. Load Google Fonts with @import in style.css. Theme ids are versioned. A released version never changes, so republishing never restyles a deck. A bare name means version 1, and a deck with no theme uses `paper@1`. --- # Decks linting Every build checks a deck against a set of rules for things that compile fine but make a worse deck. Findings come back from write_files, preview_deck and publish_deck with file, line and the rule id in brackets. An `error` fails the build, so the deck can't be previewed or published until it's fixed; a `warn` is reported and doesn't block anything. A deck can change any rule's severity (`off`, `warn`, `error`) or options in deck.json: ```json { "lint": { "style-overrides": ["warn", { "max": 5 }], "fixed-units": "off" } } ``` ## branch-target-missing Default severity: `error` A link must point at a branch id or slide name in deck.json. No options. **Flagged** `deck.json` ```json { "title": "Pricing", "slides": [{ "file": "slides/risks.mdx" }] } ``` `slides/risks.mdx` ```mdx ## Risks Pricing risk ``` ```text slides/risks.mdx: [branch-target-missing] does not match a branch id or slide name in deck.json ``` **Passes** `deck.json` ```json { "title": "Pricing", "slides": [ { "file": "slides/risks.mdx", "branches": [ { "id": "pricing", "label": "Pricing risk", "slides": [{ "file": "slides/pricing.mdx" }] } ] } ] } ``` `slides/risks.mdx` ```mdx ## Risks Pricing risk ``` `slides/pricing.mdx` ```mdx ## Pricing ``` No findings. ## branch-unlinked Default severity: `warn` Every branch needs a link on its parent slide, or viewers can't reach it. No options. **Flagged** `deck.json` ```json { "title": "Pricing", "slides": [ { "file": "slides/risks.mdx", "branches": [ { "id": "pricing", "label": "Pricing risk", "slides": [{ "file": "slides/pricing.mdx" }] } ] } ] } ``` `slides/risks.mdx` ```mdx ## Risks ``` `slides/pricing.mdx` ```mdx ## Pricing ``` ```text slides/risks.mdx: [branch-unlinked] Nothing links to branch "pricing", so viewers can’t reach it. Add … to this slide. ``` **Passes** `deck.json` ```json { "title": "Pricing", "slides": [ { "file": "slides/risks.mdx", "branches": [ { "id": "pricing", "label": "Pricing risk", "slides": [{ "file": "slides/pricing.mdx" }] } ] } ] } ``` `slides/risks.mdx` ```mdx ## Risks Pricing risk ``` `slides/pricing.mdx` ```mdx ## Pricing ``` No findings. ## slide-selector-missing Default severity: `error` A [data-slide-id] selector in style.css must name a slide in deck.json. A slide's id is its file name, so renaming the file silently drops the styles scoped to it. No options. **Flagged** `slides/revenue-q3.mdx` ```mdx ## Revenue tripled ``` `style.css` ```css [data-slide-id="revenue"] h2 { color: var(--accent); } ``` ```text style.css:1:1: [slide-selector-missing] [data-slide-id="revenue"] matches no slide in deck.json. Slide ids are file names without .mdx: point the selector at the slide's file name, or give the slide back its old name. ``` **Passes** `slides/revenue.mdx` ```mdx ## Revenue tripled ``` `style.css` ```css [data-slide-id="revenue"] h2 { color: var(--accent); } ``` No findings. ## style-overrides Default severity: `warn` A slide should not carry many one-off styles: inline style props plus style.css declarations scoped to it with [data-slide-id]. Move repeated looks into a shared class in style.css or a component. | Option | Default | Description | | --- | --- | --- | | `max` | `5` | Most overrides one slide may have, counting each inline style property and each scoped declaration | **Flagged** `slides/revenue.mdx` ```mdx ## Revenue tripled ``` `style.css` ```css [data-slide-id="revenue"] h2 { font-size: 2.4em; letter-spacing: -0.02em; margin-bottom: 0.4em; color: var(--accent); } ``` ```text slides/revenue.mdx:3: [style-overrides] 6 style overrides on this slide (2 inline style properties, 4 declarations under [data-slide-id="revenue"] in style.css); the limit is 5. Move them into a shared class in style.css or a component so slides stay consistent. ``` **Passes** `slides/revenue.mdx` ```mdx ## Revenue tripled ``` `style.css` ```css .hero-stat { color: var(--accent); font-size: 1.4em; } ``` No findings. ## fixed-units Default severity: `warn` Size things in style.css with cqmin or em, not px, so one slide works on the 16:9 stage and on phone stories. Rules that only style SVG content are skipped, since px there are viewBox units. | Option | Default | Description | | --- | --- | --- | | `maxPx` | `2` | px values up to this size are allowed, for hairlines | **Flagged** `slides/cover.mdx` ```mdx # Q3 review ``` `style.css` ```css h1.md { font-size: 64px; border-bottom: 1px solid var(--muted); } ``` ```text style.css:2:3: [fixed-units] "font-size: 64px" uses px, which doesn't scale with the slide. Use cqmin or em (64px is about 8.9cqmin on the desktop stage). ``` **Passes** `slides/cover.mdx` ```mdx # Q3 review ``` `components/Chart.tsx` ```tsx export function Chart() { return ( Q3 ); } ``` `style.css` ```css h1.md { font-size: 9cqmin; border-bottom: 1px solid var(--muted); } .chart-label { font-size: 14px; } ``` No findings.