Skip to content
ghostui

What belongs here

Blocks are reusable compositions. They connect components, content, and workflow context. A component owns a stable focused contract. A block owns the arrangement around that contract.

ComponentInstallable behavior with named props, states, and a focused preview.
Documentation patternA repeated docs master such as Preview, API reference, or table of contents.
BlockA complete working composition that a product team can copy and own.

Documentation patterns

These masters are reused across component detail pages. Each one has a single implementation in apps/web/src/docs and a working example here.

Preview and source

Preview centers the working demo, keeps a 16:9 minimum stage with 16px internal padding, caps normal content at 70%, and exposes the exact source below it.

Table of contents

TableOfContents owns anchor navigation, active-section state, deep links, and reduced-motion behavior. The page owns the item labels and section IDs.

API and property reference

ApiTable accepts typed rows. It keeps property names, types, defaults, required state, and behavior descriptions consistent across detail pages.

Source, install, and structure

Use CodeBlock for a full source excerpt, Snippet for a copyable command, and Structure for the file boundary. These are separate masters because their actions and reading density differ.

Install

Complete compositions

Grouped surface

LayerCard groups a surface under one heading. The preview remains a working composition; the source remains the exact excerpt.

Release checklist

Two items before launch.

  • Review copy Done
  • Set publish date Next
Updated today

Content-agnostic progress

Progress.Background is a container, not a subject. It tracks any content against a target through value, max, and label.

Release checklist

5 items left to review

Worked Postcard block

Complete blocks keep their working composition. This example uses the same interaction as the gallery: flip the card, use the controls, or press F.

A bicycle on a quiet road in the Santa Cruz mountains at dawn

a bicycle for the mind.

santa cruz mountains, 7:00 am.

Ownership

Copy a block into your app and own its layout and content. Installable components remain stable package contracts. Documentation patterns remain composable masters, not hidden application runtime.