Skip to main content
WireKit

Long-form Article

The canonical pattern for blog-post / feature-article pages: a single <x-wirekit::reading-shell> wrapper provides the reading-progress bar, the sidebar mini-TOC, and the return-bookmark prompt. Drop a <x-wirekit::reading-meta> next to the article header for the time-to-read estimate.

Sensible defaults for a typical 1500–4000 word article: 3px primary progress bar pinned to viewport top, right-side spine with hover-expand at md+, bookmark prompt with 30-second dwell threshold. Honors prefers-reduced-motion: reduce end-to-end.

Full Composition

Canonical long-form-article shell

Decomposed Composition

For the same UX without the shell wrapper — useful when you need to interleave other components or wrap the article body in a custom container.

Manual composition (no shell)

Density variants

Pass density="compact" for a slimmer profile (sm-height bar, always-md spine expand) or density="minimal" for the bare-minimum chrome (sm bar only, no spine, no meta). The preview shows the compact density — the spine sits permanently expanded and the progress bar is the slim variant.

Compact density — slimmer bar, always-expanded spine

Power-user composition (skip the shell)

When per-primitive customization is needed beyond what toggles + density cover, mount the primitives directly. The shell covers the common defaults case; anything beyond it is served by composing the primitives.

Custom: success-colored progress + numbered spine + reading-meta

Why this composition

  • Progress bar at the top: glanceable "how much is left" cue — Medium / Substack convention.
  • Sidebar spine on the right: keeps the TOC accessible without consuming horizontal real estate (collapsed = 1.25rem; expanded = 16rem only on hover/focus).
  • Bookmark prompt bottom-right: only surfaces on return-visit, only after meaningful dwell time — never noisy.
  • Time-to-read meta above the body: sets expectations BEFORE the reader commits.

The four primitives don't communicate; each owns its own state. That makes the composition robust to changes in any one of them — you can opt out per-component or override individual props without breaking the others.

  • Reading — the consolidated family page with every primitive + composition + family contracts