01 / Components

The building blocks.

Real content, composed in different ways. Resize the window to see each layout respond.

Warm sandstone cliffs meeting a blue sea

HeroSection: a strong opening

A headline, a landscape and a clear next step. The medium hero leaves room for the story below.

RichTextSection: words with room to breathe

A small field journal

The best pages begin with something worth sharing. Markdown supports headings, lists and ordinary links.

  • Keep the structure clear.
  • Let the content set the pace.
  • Explore surfaces when the story changes.

ImageSection: image on the left

Layers of green mountains beneath a pale sky

A wide landscape on the left. Explicit dimensions reserve space while the image loads.

ImageSection: image on the right

Warm sandstone cliffs meeting a blue sea

A square crop on the right. The media and text stack when the section becomes narrow.

VideoSection: native video playback

A short, silent flower clip with native video controls. Playback requires access to the external MDN media host; no application JavaScript is needed.

CardGridSection: a responsive collection

ContentGrid and ContentBlock: responsive columns

The grid has 4, 6, 8 or 12 columns, based on its container width. These blocks stack on small screens and share a row when more room is available.

4 → 3 → 5 → 8 columns

The main story

A flexible area for the content that deserves the most attention.

4 → 3 → 3 → 4 columns

A related thought

A companion to the main story, with its own responsive span.

Section: narrow reading layout

This section uses the narrow layout, capped at 780px by the default theme. Its grid responds to that smaller container, even on a wide screen.

A note in the margin.
A second perspective.

Card, Image and ButtonGroup: standalone blocks

Card

Image

Layers of green mountains beneath a pale sky
A standalone Image with a 2:1 crop and a native figure caption.

ButtonGroup

ButtonGroup can contain ordinary links, too.

Section: full-width background

The section surface uses full width; its content retains the canonical maximum. On the backgrounds page, full-width surfaces keep their content inside the normal page column.

Sections: rendering content from data

The following two sections come from a typed, serializable PageData object in src/lib/content.ts. Sections chooses the renderer from each record's type.

{
  "type": "richText",
  "id": "data-story",
  "title": "A story from data",
  "headline": "A field guide to slower days",
  "body": "A small collection can start with **plain data**. These sections are rendered by `Sections`, using the same components as the examples above.",
  "background": {
    "color": "standard"
  }
}

A field guide to slower days

A small collection can start with plain data. These sections are rendered by Sections, using the same components as the examples above.

Along the coastline

Warm sandstone cliffs meeting a blue sea

An image, a description and a layout preference. No component imports belong in this content model.