@refrakt-md/design

Design system runes for documenting colors, typography, spacing, and component previews. Build living style guides and design token documentation — all from Markdown.

Installation

npm install @refrakt-md/design
{
  "packages": ["@refrakt-md/design"]
}

Runes

RuneDescription
swatchInline color chip for referencing colors in prose
paletteColor swatch grid with optional WCAG contrast and accessibility info
typographyFont specimen display with live Google Fonts loading
spacingSpacing scale, border radius, and shadow token display
previewComponent showcase with theme toggle, responsive viewports, and adjustable width
mockupDevice frame mockups for screenshots
design-contextUnified design token card composing palette, typography, and spacing runes

Cross-page pipeline

This package includes a cross-page pipeline that aggregates design tokens across your site. When you use {% design-context %} runes on different pages, the pipeline indexes all tokens into a site-wide registry. This enables cross-referencing and consistent token documentation across your design system.

When to use

Use this package for design system documentation, style guides, brand guidelines, or any project that needs to document visual design decisions. The design-context rune ties everything together — define your tokens once and reference them consistently across pages.