A unified inbox, documented.
The source of truth for every surface, chrome button, and motion spec that ships inside the Knokk desktop app — Messenger, Telegram, Instagram, WhatsApp, Gmail and more in one window. Open source, AI-referenceable, kept in sync with the live Electron build.
For AI agents
Machine-readable references for use in agentic code generation, retrieval, and automation. Read the manifest first — it captures conventions (no red/orange, match-window-radius, outlines-only, tooltip pattern) that live across many files in the app repo.
Components
Color palette
Every colour Knokk uses, organised by role. Yellow is the brand and the default per-account accent. Blue is reserved for hyperlinks. Red and orange are reserved for error states only and never appear in chrome.
Spacing
A 16-step ladder on a 4-px base, with three half-steps (2 / 6 / 10) for
tight chrome (icon rows, kbd chips, menu rows). Derived from a live audit
of every padding, gap, and
margin literal in the renderer — not aspirational.
The four most-used values (8, 6, 4, 12) cover over half of all spacing usage.
See the full Storybook story →
Usage
The components are mirrored from the live Knokk Electron app at
/Users/carlhagerling/Documents/Apps/Knokk.
To reuse, copy the source from the path listed in
components.manifest.json#components[].appSource:
# Read the manifest, find the closest component, copy the source
curl -s https://hagerling.se/apps/knokk/components/components.manifest.json \
| jq '.components[] | select(.name == "TabBarTab")'
# → returns { appSource: "src/renderer/src/components/layout/TabBarTab.tsx", ... }
cp $KNOKK_REPO/src/renderer/src/components/layout/TabBarTab.tsx ./src/ Hard rules
- Yellow is brand.
#ffe100for the hand logo, primary CTAs, default per-account accent. - Blue is for links.
#5b7fffon every<a>. Never as a chrome highlight. - Dark theme primary is yellow.
#ffe100through--knokk-primary, with dark ink on top. Selected cards are yellow too, as a ring plus a tint. The unread outline is never yellow: a quiet neutral hairline (white at 8%, about 1.8:1), because the Unread pill carries the state. The app's light theme keeps its blue accent and violet selection. - No red or orange. Both reserved for error states only.
- Outlined chrome buttons over solid fills — header buttons, format toggles, Save/Cancel are outlined; cards, list rows, the active folder, the Send button keep solid backgrounds.
- Concentric corners. An inner element's radius equals the outer container's radius minus its padding.
outer 8px + padding 4px → inner 4px. If the math goes negative, the inner is square. - Use the shared
<Tooltip>from@/lib/Tooltip— never the nativetitle=attribute on chrome buttons. - Style props over Tailwind utilities for padding/border/radius/background on
motion.div+ portal containers — Tailwind silently fails there. - Spring physics for tap/hover.
{ type: 'spring', stiffness: 500, damping: 30 }by default.