Brainfish Design Guidelines · v0.2

Everything Brainfish makes, built from one source.

Tokens, components, layouts and motion for the Brainfish platform. Read it here, build with it in code, or hand it to your AI agent.

Semantic tokens
48
Palette steps
100
Component pages
11
Themes × modes
2 × 2

BDG is how we keep everything Brainfish makes, from a quick prototype to production code, feeling like one product. It has three parts that always agree with each other, because they are built from the same source:

  • Tokens: the named values (colours, spacing, type, shadows, motion). Exported from Figma, built into CSS and Tailwind.
  • Guidelines: what to use, when, and why. Markdown in guidelines/, rendered as this site.
  • Skill: the guidelines packaged as agent skills for any AI model or tool, so "build me a settings page" comes out on-brand the first time.

Learn it in 10 minutes

Read these in order. Each page starts with a summary, so skim and come back for detail.

  1. Principles and Taste: the ideas behind every decision, and the small details that make UI feel right. (3 min)
  2. Semantic colour, Palette and Theming: the tokens you build with, the raw ramps behind them, the two themes (BF and Ballet), dark mode. (3 min)
  3. Typography and Spacing: Fraunces for display, Geist for everything else, an 8px grid named like Figma. (2 min)
  4. Button: the signature "stamp" control. If you understand this one you understand the look. (1 min)
  5. App shell: where everything sits on screen. (2 min)
  6. Motion: when to animate at all, then which curve and duration. (2 min)

Use the theme and mode switches in the site header while you read: every example on every page is live.

The mental model

primitive     →  semantic             →  component         →  layout
--bf-lime-400    --bf-brand              .bf-btn--primary     .bf-app
--bf-mono-700    --bf-text-subtle        .bf-nav-item         list-detail page
--bf-space-100   (gap inside a button)   .bf-input            empty state
  • You almost never touch primitives. They are the palette.
  • You build with semantic tokens. They say what a value is for, and they change with theme and mode.
  • Components and layouts are recipes made of semantic tokens. Use them before inventing anything new.

Use it every day

Task How
Get an AI agent to do any of this Install the agent skills: brainfish-design plus taste, motion and testing skills.
Prototype an idea in an hour Ask your agent with the brainfish-design skill: "Prototype the Inbox empty state using BDG." See Prototyping.
Make an on-brand artifact (one-pager, internal tool, dashboard) Same skill: "Make an internal tool page for X, BDG styling." See Artifacts.
Build or change product UI Use the Tailwind preset and component recipes. See Product code.
Check something before shipping Run the Review checklist, or ask your agent to "review this against BDG."
Something's missing See Contributing. Don't hard-code it.

Install

In a product repo (Tailwind v3):

js
// tailwind.config.js
module.exports = {
  presets: [require('./vendor/bdg/dist/tailwind-preset.cjs')],
  content: ['./src/**/*.{ts,tsx}'],
};
css
/* global.css */
@import './vendor/bdg/dist/tokens.css';
html
<html data-theme="bf" data-mode="light">

Tailwind v4: @import "tailwindcss"; @import "./tokens.css"; @import "./tailwind-theme.css";

For a prototype or artifact (no build step): link dist/tokens.css and dist/bdg.css, add class="bf-root" to <body>, and use the .bf-* classes shown on every component page.

For AI agents: install the brainfish-design skill (see skills/brainfish-design). Agents that read .agents/skills/ pick it up automatically inside this repo; see Agent skills for other tools.

Edit START-HERE.md