name:uikit-letterpress
description:Implements warm editorial letter websites, pastel stationery document workspaces, yellow marker highlight annotations, calligraphic signature flourishes, asynchronous team check-in streams, and Cmd+K editorial navigation using the Letterpress — Editorial Docs design system (W3C DTCG tokens, Tailwind v4 @theme, Figma variables, Light & Evening Dark modes, 7 TSX templates, and governance/eval specs).
license:MIT
compatibility:"React 18+/19+, Next.js 14+/16+, Tailwind CSS v4, TypeScript 5+"
metadata:
id:"letterpress"
version:"2.2.0"
category:"productivity-editorial"
status:"stable"
author:"uikits.tech"
backbone:"uikit-backbone"
iconLibrary:"@phosphor-icons/react"
preview:"/previews/letterpress-hero.webp"
uikit-letterpress — Master Execution Protocol (v2.2.0)
You are building UI with the Letterpress — Editorial Docs UI Skill Pack (tokens/ + templates/ + governance/eval specs). Pair with registry/backbone/ (uikit-backbone) for full 27-component and 6-page-recipe coverage.
WARM PAPER & MARKER MANDATE: Never treat this pack as loose aesthetic inspiration. Build calm, plain-spoken document interfaces anchored on warm cream rag paper (#fbf8f1), floating white letter sheets (#ffffff), rotating pastel stationery stocks (mint #f4faf5, lilac #faf5ff, peach #fff7f0, sky #f2f7ff), rich charcoal letterpress ink (#1f1d1a), Instrument Serif expressive display headlines, a single cobalt action color (#1d4ed8), and hard-edged yellow highlighter washes (#fde047 ALWAYS paired with #1f1d1a dark ink) automatically on the very first pass.
1. Task-Based Read Routing
Always read DESIGN.md and tokens.css first, then load the companion specs and drop-in templates for the target surface:
2. Bootstrap Procedure (Step 0 Before Writing Components)
- 1.Wire Fonts in
src/app/layout.tsx:
Load Instrument_Serif (--font-instrument-serif, weight 400, normal & italic), Inter (--font-inter, weights 400, 500, 600), and JetBrains_Mono (--font-jetbrains-mono, weights 400, 500, 600) via next/font/google, and attach their variable classes to <html>.
- 2.Import
tokens.css and tokens/tailwind.css:
Copy tokens.css into src/app/globals.css (or import uikit-letterpress.tokens.css and tokens/tailwind.css) immediately after @import "tailwindcss";. This registers Light (:root, [data-theme="light"], .light) and Evening Dark ([data-theme="dark"], .dark) token trees, rotating pastel paper stocks, and @keyframes (lpMarkerSweep, lpPageSettle, lpSignatureTrace, lpPastelFade, lpDrawerSlide, lpPulseDot).
- 3.Install All 7 Starter Primitives:
Copy templates/EditorialDocShell.tsx, templates/HighlightLetterCard.tsx, templates/ProjectCheckinFeed.tsx, templates/CommandPalette.tsx, templates/StatusBadge.tsx, templates/ScrollReveal.tsx, and templates/Sparkline.tsx into src/components/uikit-letterpress/ (or run npx uikits-md add letterpress).
- 4.Dependencies & Scope:
- Peer dependencies:
react, react-dom, @phosphor-icons/react. - Do not use for dark-only high-frequency trading desks, neon arcade menus, or hyper-dense 12-column telemetry walls where serene document cadence undermines sub-second alert scanning.
3. The 12-Point Automatic First-Pass Contract
Every interface built under uikit-letterpress MUST implement all 12 rules automatically:
- 1.Warm Rag Paper & Zero Hardcoded Hexes: Bind every surface, border, and ink color strictly to CSS variables (
bg-[var(--background)], bg-[var(--card)], text-[var(--foreground)], border-[var(--border)], bg-[var(--lp-highlight)]) with ZERO hardcoded #hex values in TSX so Light (#fbf8f1) and Evening Dark (#151412) switch instantaneously. - 2.Expressive Serif Display + Calm Grotesque Prose: Set hero titles, letter headlines, and section openers in
Instrument Serif (.lp-display, -0.02em tracking); set body prose in Inter (15px–17px, line-height: 1.65, reading measure constrained to 64ch–76ch); set dates, issue numbers, shortcuts, and metrics in JetBrains Mono with tabular-nums. - 3.Hard-Edged Yellow Highlighter Discipline: Paint
.lp-mark (--lp-highlight #fde047 in Light mode / #5b3e82 evening plum in Dark mode) with border-radius: 0px, font-weight: 600, and locked --lp-highlight-ink (#1f1d1a in Light mode for 12.75:1 AAA / #f5f1e8 in Dark mode for 7.58:1 AAA). Never round highlighter marks into pills and never set light text on yellow. - 4.Single Action Cobalt Hue: Reserve
--accent (#1d4ed8 light with #ffffff ink 6.70:1 AA / #60a5fa dark with #151412 ink 7.24:1 AAA) strictly for clickable controls, inline underlined links (.lp-inline-link), and primary publish/save CTAs. Never use cobalt as decorative background wallpaper. - 5.Rotating Pastel Stationery Stocks: Differentiate check-in notes and editorial callout bands using the four near-white paper stocks (
--lp-pastel-mint, --lp-pastel-lilac, --lp-pastel-peach, --lp-pastel-sky) and their matching evening dark tints while keeping primary cards crisp white (--card). - 6.Layered Paper Elevation Without Heavy Drop Shadows: Elevate floating letter sheets using
--lp-shadow-sheet (inset hairline + soft ambient pool) and 1px solid var(--border) rules; never apply shadow-2xl or rounded-3xl to stationery cards. - 7.Tactile Hero Letter Sheet & Signature Craft: Anchor landing pages with
HighlightLetterCard featuring a specular hairline paper edge, animated highlighter emphasis sweep (lpMarkerSweep), an authentic calligraphic SVG signature path (lpSignatureTrace), and an interactive annotation toggle—never flat clipart illustrations or empty right-hand hero voids. - 8.Interactive Async Check-in Stream &
⌘K Command Palette: Provide live check-in composing (ProjectCheckinFeed), instant keyboard search via Cmd/Ctrl+K (CommandPalette), and capture-phase Escape dismissal so dropdowns close cleanly before modals or slide-over panels. - 9.Progressive Visible-by-Default Motion: Pair
ScrollReveal.tsx (.js-ready + .is-in so content remains visible if JS or observers are unavailable) with compositor-only motion (transform, opacity, stroke-dashoffset), offscreen animation pausing ([data-offscreen="true"]), and complete @media (prefers-reduced-motion: reduce) fallbacks. - 10.Complete Async & Form State Parity: Ship every workspace screen with warm parchment loading skeletons (
bg-[var(--muted)]), encouraging empty states with reset actions, inline form validation bound to --destructive, and non-blocking toast confirmations. - 11.Brand-Safe Icons & Verified Media: Use
@phosphor-icons/react exclusively (weight="regular" default), neutral editorial names (Northstar Press, Kestrel Studio, Arbor Notes, example.com), and verified local .webp assets or typographic SVG flourishes—zero external stock placeholder URLs or third-party trademarks. - 12.Skip Link, Accessible Data-Viz & Responsive Zero-Overflow: Place
<a href="#main-content" className="sr-only focus:not-sr-only ...">Skip to content</a> first in DOM order, back every <Sparkline> with an sr-only data table, and confirm zero horizontal overflow or header collisions from 390px mobile to 1440px desktop.
4. Explicitly Forbidden Anti-Patterns
- BANNED: Pure
#000000 (bg-black), cold bg-slate-950, neon indigo/purple/pink gradients (from-indigo-500), or glowing cyberpunk chrome. - BANNED: White or low-contrast muted ink on
#fde047 yellow highlighter washes, or rounded pill radii on inline highlighter marks. - BANNED:
rounded-3xl, shadow-2xl on cards, unstyled browser dialogs (alert(), confirm()), or hardcoded #hex fills in TSX templates. - BANNED: Unbounded prose stretching past
76ch, external stock placeholder URLs, empty boxes saying "image goes here", or third-party brand names.
Hero Card & Visual Craft Mandate
- Zero Clipart SVGs for Real-World Subjects: Never draw physical objects (buildings, desks, books, garments, hardware, people, vehicles) with primitive flat
<svg> polygons. Physical editorial photography MUST use verified local .webp studio assets (fetchPriority="high", locked aspect-ratio, contrast-safe scrims). - High-Craft Editorial Sheet & Vector Signature Discipline: For typographic Hero Letter Cards, craft a layered stationery sheet with subtle top specular hairline, ruled margin coordinates,
font-variant-numeric: tabular-nums edition counters, opaque pill badges (rx="4") with zero overlapping text, animated yellow marker sweep, and calligraphic ink <path> signature tracing.
Card, Diagram & Data Table Craft Standard
- DOM-First Product Visuals (Zero Slide-Style Circle Diagrams): Never depict workflows, pipelines, or architecture with numbered
01 → 02 → 03 <circle> SVGs, wavy dashed connectors, and repeated step boxes underneath. Render real miniaturized software UI in HTML/DOM: a crisp object/endpoint header, a focal tabular-nums figure with split metadata, a clickable proportional execution waterfall or timeline bar, and a flush hairline telemetry/signal matrix below with zero nested card-in-card clutter. - Unified Metric Rails Over Identical Floating Boxes: Prefer a single hairline-divided KPI rail flush to the workspace container over 4 disconnected floating rounded cards. Lead with one focal
tabular-nums value, an inline semantic delta (no redundant pill chrome), and a compact composition bar or sparkline grounded in real row data. - Dense, Interactive Data Tables: Operational lists (>6 items) must ship a toolbar (instant search, faceted filters, and a
compact/comfortable density toggle), sortable headers (aria-sort), multi-row selection with a custom color-scheme-safe checkbox and contextual bulk-action bar, multi-layer cells (primary label + mono ID + sub-meta), inline micro-meters for numeric scores, right-aligned tabular-nums values, hover-revealed quick actions, and @container-responsive column collapse with zero duplicate mobile status badges on desktop. - DOM-First Node Graphs & Topology Cards: Never render topology, ontology, DAG, module-bundle, or entity-relation graphs as
<svg><rect><text> boxes with tiny unreadable SVG text or diagonal dashed lines slicing through labels. Structure graphs as tiered HTML/DOM interactive node cards (>=12.5px titles, >=11px mono IDs, semantic status LED, inline latency/throughput/weight micro-bar, upstream/downstream highlighting) with any connector lines confined strictly to dedicated column gutters. - Visual Critique Gate: Inspect rendered cards and tables at desktop (
1440px), split-pane (700px), and mobile (390px) to verify zero clipped text, zero duplicate badges, zero dark-mode native checkbox bleed on light surfaces, and 0px horizontal overflow.