@aios-alpha/design
v0.3.0
Published
AIOS unified design system — DTCG tokens, CSS variables, Tailwind v4 theme, and Pencil variables. Editorial Minimal direction: greyscale chrome, Instrument typography, colour rationed to badges and data viz.
Readme
@aios-alpha/design
The one design system for every AIOS surface — website, team brain, workspace GUI, and every scaffolded workspace. Editorial Minimal direction: dual-mode, greyscale chrome, Instrument typography, colour rationed to badges and data viz.
| Package | What it ships |
|---------|---------------|
| @aios-alpha/design (this repo root) | DTCG tokens → dist/tokens.css, dist/tailwind-theme.css, DESIGN.md |
| @aios-alpha/ui (react/) | shadcn-based React components themed through the token bridge |
DESIGN.md— pinned design contract (likebrain-api.mdfor sync). Read this before building UI.tokens/*.json— DTCG source of truth. Edit here, then rebuild.dist/— generated bynpm run build:tokens(gitignored; CI rebuilds before publish).
Build
npm install
npm run build:tokens # regenerates dist/
cd react && npm install && npm run build # compiles @aios-alpha/ui to react/dist/Consume in another repo
Install both packages (npm, same version — currently 0.2.0):
npm install @aios-alpha/design@^0.2.0 @aios-alpha/ui@^0.2.0Tailwind v4 app — global stylesheet, in this order:
@import "@aios-alpha/design/tokens.css";
@import "@aios-alpha/design/tailwind-theme.css";
@import "tailwindcss";
@source "../node_modules/@aios-alpha/ui/dist";
@custom-variant dark (&:where(.dark, .dark *));Self-host fonts (no Google CDN):
@import "@fontsource/instrument-serif/400.css";
@import "@fontsource/instrument-sans/400.css";
@import "@fontsource/instrument-sans/500.css";
@import "@fontsource/instrument-sans/600.css";
@import "@fontsource/instrument-sans/700.css";
@import "@fontsource/jetbrains-mono/400.css";Then use bridge utilities (bg-background, text-foreground, bg-primary, text-violet, font-display, rounded-full, …). Toggle dark mode with class="dark" on <html>.
React components:
import { Button, TierBadge, AiosMark, KpiStat } from "@aios-alpha/ui";Astro / Starlight — import tokens.css and map --aios-* onto Starlight's --sl-* (see aios-website).
Raw CSS (no Tailwind) — import tokens.css and use var(--aios-*) directly.
Semantic tokens (0.2.0)
| Token | Use for |
|-------|---------|
| --aios-primary | Pill buttons, active tabs (near-black light / white dark) |
| --aios-violet | Brand mark, team/deliverable badges, link accents |
| --aios-accent | Lime — live status, checks, rationed affirmative actions |
| --aios-emerald/amber/cyan/fuchsia | Kind/tier badges, KPI sparklines |
Migrating from 0.1.x
- Fonts: Space Grotesk + Plus Jakarta Sans → Instrument Serif + Instrument Sans.
- Buttons: violet glow pills → near-black/white editorial pills (
primarytoken changed). - Badges: team/deliverable now use
violettoken, notprimary. - Local CSS bridges: if you alias
--accentto--aios-primary, split — buttons stay onprimary, link/highlight washes move to--aios-violet.
Light vs dark
Light is :root. class="dark" on <html> swaps color values; type, spacing, and radius are mode-independent.
Pencil prototyping
dist/tokens.pencil.json holds flat token maps for the Pencil MCP set_variables call. See PENCIL.md.
