Skip to content

Prose

Stable Available in release assets

Give long-form semantic HTML a calm reading measure and consistent vertical rhythm without requiring an authored class on every descendant.

Prose primary example

Show code
<article class="thin-prose" aria-labelledby="field-notes-title">
  <header>
    <p>Field notes · <time datetime="2026-08-01">August 1, 2026</time>
  </p>
  <h2 id="field-notes-title">Designing for content that refuses to be tidy</h2>
</header>
<p class="thin-lede">Readable defaults should survive long words, nested lists, code, quotations, figures, and languages with very different rhythms.</p>
<h3 id="meaning-first">Start with meaning</h3>
<p>Choose the element that describes the content. A <a href="#reference">real link remains recognizable</a>, and <code>overflow-wrap</code> protects the measure without changing the words.</p>
<blockquote>
  <p>Presentation can support a document, but it should not become the document.</p>
  <footer>— Interface field guide</footer>
</blockquote>
<figure>
  <div data-media-missing role="img" aria-label="Diagram unavailable">Diagram unavailable</div>
  <figcaption>A written fallback keeps the point available when media does not load.</figcaption>
</figure>
<h4 id="reference">Review checklist</h4>
<ul>
  <li>Keep headings in order.</li>
  <li>Label abbreviations and include units in text.</li>
  <li>Test <code>https://example.test/a-deliberately-unbroken-reference-that-must-wrap</code>.</li>
</ul>
</article>

Each authored example uses the production assets and includes copyable markup.

Anatomy

  • Semantic prose container
  • Optional header and lede
  • Ordered heading hierarchy
  • Paragraphs and lists
  • Links and inline code
  • Block quotations
  • Figures and captions

Variants and sizes

  • Article — shown above
  • Documentation section — shown above
  • Editorial lede — shown above
  • Prose with figures — shown above

Rendered fixtures exercise authored content and constrained layouts with the same production assets.

  • Narrow container — shown above
  • Wide container — documented, example pending
  • Long unbroken references — shown above
  • Deeply nested lists — shown above
  • Missing media fallback — shown above
  • Right-to-left content — documented, example pending
  • Print — documented, example pending
  • Two-hundred-percent text — documented, example pending

Interaction and keyboard behavior

Prose owns no interaction. Links, details, media controls, and other native descendants retain their browser behavior and focus treatment.

Accessibility

Use the semantic element that matches the document, keep heading levels coherent, provide meaningful link text and media alternatives, and do not use visual type size as a substitute for structure.

Contract
COMPOSE
Basis
Native document content and table/scroll region; no APG widget
Evidence
  • tests/unit/library/content-patterns.test.ts

API

Add .thin-prose to an article, section, or other semantic long-form container. Optional .thin-lede increases introductory emphasis; --thin-prose-measure and --thin-prose-space tune measure and rhythm locally.

Behavior tier: native

Custom properties

PropertyDefaultDescription
--thin-prose-measure70chMaximum readable inline measure.
--thin-prose-space1lhVertical rhythm between direct prose children, one line by default.

Fallback

The complete semantic document, heading hierarchy, links, lists, quotation attribution, and media fallback remain readable without CSS or JavaScript.

Assets and dependencies

  • /components.css

Dependencies: None

Source: packages/ui/src/items/prose/style.ts

Stability evidence

  • Semantic heading hierarchy, block quotations, figures, missing-media fallback, and no-JavaScript fixture: test:tests/unit/library/content-patterns.test.ts
  • Complete item-specific API, fallback, variant coverage, and difficult-state documentation: test:tests/unit/library/content-patterns.test.ts
  • Cross-theme, density, localized, narrow-container, zoom, and forced-colors fixture: review:site/src/pages/quality/index.astro#quality-review

Composition

Derived from the examples and style specs, not authored.

Used by