Skip to main content

Components

A cheat-sheet of every component available when writing posts on this site — the Docusaurus/MDX built-ins and the custom components in src/components/. Each author-facing component is shown rendered live with its source underneath, so you can see what it looks like and copy the exact syntax. Internal theme components (cookie banner, share row, …) are listed at the bottom for completeness.

Admonitions​

Callout boxes. Built into Docusaurus — no import. Keywords: note, tip, info, warning, danger. An optional title follows the keyword. They render as the post page kit's Callout: a neutral surface with a coloured rail, and "Side note — safe to skip" on note and info (P15).

MD
:::tip
A handy shortcut.
:::

:::info[Going deeper]
Extra context for the curious.
:::

Code fences with a title​

A fenced code block. Add title="…" for a filename header + copy button. The language after the opening backticks enables syntax highlighting.

example.tsTS
const greeting: string = "hello";
console.log(greeting);
MD
```ts title="example.ts"
const greeting: string = "hello";
console.log(greeting);
```

Collapsible <details>​

Native HTML — a click-to-expand block. Leave a blank line after </summary> so the Markdown inside is parsed.

Click to expand

Hidden content — supports Markdown, lists, and code.

  • one
  • two
MDX
<details>
<summary>Click to expand</summary>

Hidden content — supports **Markdown**, lists, and code.

- one
- two
</details>

Mermaid diagrams​

Fenced ```mermaid blocks render as diagrams (enabled site-wide via @docusaurus/theme-mermaid). Each one renders in the post page kit's DiagramFrame: a title bar, zoom and a full-screen viewer (a thumbnail with "Open diagram" on phones). Add accTitle: and accDescr: to give it a title and a text version.

Flowchart
MD
```mermaid
flowchart LR
Author[Author] --> MDX[MDX post]
MDX --> Page[Rendered page]
```

Highlight <u>​

The house convention for marking the single key sentence of a section. Authored <u> (and <mark>) draws an indigo highlighter marker, not an underline: the post page kit's Highlight recipe, applied by a global rule in custom.css. Use sparingly.

This is the one sentence a reader should remember.
MDX
<u>This is the one sentence a reader should remember.</u>

Tables​

Write normal Markdown tables. Every table renders in the post page kit's DataTable frame: sticky header, edge fades and keyboard scrolling when it's wider than the page, and on phones a table with 3+ columns turns each row into a card of labelled fields — no import, nothing to call.

ComponentKindImport?
ImagePlaceholdercustomno
Admonitionbuilt-inno
MD
| Component | Kind | Import? |
| --- | --- | --- |
| ImagePlaceholder | custom | no |
| Admonition | built-in | no |

ImagePlaceholder​

Custom, globally registered (no component import — just import the image asset). A lazy-loaded image with a blur-up 🏞️ placeholder until it loads. The main way to add images to a post.

The site mascot
MDX
import cover from './images/cover.webp';

<ImagePlaceholder src={cover} alt="A short description of the image" />

Youtube​

Custom, globally registered. A responsive, lazy-loaded YouTube embed. Pass the embed URL (/embed/<id>), ideally the youtube-nocookie.com variant.

MDX
<Youtube src="https://www.youtube-nocookie.com/embed/VIDEO_ID" />

Button​

Custom — a styled link. Requires an explicit import (it's not globally registered).

Read the blog
MDX
import Button from "@site/src/components/Button";

<Button to="/blog" variant="primary">Read the blog</Button>

PodcastPlayer​

Custom, globally registered. The audio card for the spoken version of a post: it renders the post page kit's AudioPlayer (play, seek, speed). Import the audio asset and pass it as src. (Shown as source only here — a live demo would need an audio file.)

MDX
import podcast from './audio/podcast.mp3';

<PodcastPlayer src={podcast} title="Listen to the podcast version" />

Post page kit​

The components of the redesigned post page, each in its own folder with a CSS Module (ADR 0007). Every blog post renders with them (opt out with kit: false); see each one live on the Post page kit page.

ComponentTagWhat it is
ReadingProgress02Reading progress hairline
ReadingBar01Slim bar with title, section and time left
RelatedPosts03Related, latest and folded years
PostEyebrow04Blog / date · reading time
PostTitle05Balanced h1
Byline06Author avatar, name, role
WhatsInside07Chips with the size of a long post
ShareButtons08Share and copy link; native sheet on phones
PostCover09Hero image
LeadParagraph10Opening paragraph with drop cap
Highlight11Indigo highlighter mark
Gist12The gist block
TableOfContents13Grouped "On this page"
SectionHeading14h2 with copy-link chip
SubHeading15h3 with indigo marker
Prose16Body text wrapper
InlineCode17Code word in text
StepList18Numbered step cards
DataTable19Framed table; cards on phones
RatingPill20Tinted rating pill and legend
DiagramFrame21Diagram card with zoom and full screen
CodeFrame22Code block header with Wrap and Copy
Definition23Term and definition card
Callout24Side note with a coloured rail
Disclosure25Collapsible block
AudioPlayer26Audio version player
Glossary27Filterable glossary grid
GlossaryTerm27bTerm with a popover
References28Numbered sources
TagList29Filed-under tags
EditLink30Suggest an edit on GitHub
PostNav31Newer / older post cards
CommentsFrame32Comments card with consent gate
SiteFooter33Footer columns; accordion on phones
BackToTop34Back to top button
ContentsDock35Phone contents dock and sheet
PullQuote36Pull quote
UpNext37The post to read next, shown near the end

Internal components​

Not authored inside posts — they're wired into the theme. Listed here so the catalogue is complete (and so the enforcement hook passes).

ComponentPurposeWhere it's rendered
CommentsComments block (currently a no-op stub)<Comments />, available but inactive
ConsentBannerCookie-consent opt-in bannerInjected site-wide via theme/Root.js
ManageConsentWithdraw/revisit consent controlThe /privacy page
ResourceDirectoryFilterable card directory of the data.json links, grouped by groups.jsThe /resources index, generated by the resources plugin