@devpraxis/design-tokens
v0.3.5
Published
FlowChat design tokens (brand colors, mobile palette) — single source of truth shared across flowchat web, mobile, and landing. Brand assets (logos, favicons) live separately — different lifecycle, not a token.
Readme
@devpraxis/design-tokens
FlowChat design tokens — single source of truth for brand primitives, semantic light/dark themes and the mobile app's dark-only palette. Shared across the FlowChat app, authentication screens, settings, standalone modules, mobile app and landing page.
Brand assets (logos, favicons, mascot art) deliberately live outside this
package — they have a different lifecycle and purpose than token values
(versioned per-app, produced/updated by design work rather than a code
change, and in at least one case today, large binary files that shouldn't
bloat every consumer's node_modules). Each consuming app owns its own copy
of whatever brand assets it needs.
Install
npm install @devpraxis/design-tokensPublished to the public npm registry — no auth needed to install.
Usage
import { palette, mobileColors } from "@devpraxis/design-tokens";
palette.blue[600]; // "#006CF4"
mobileColors.primary; // "#006CF4"What's in scope here
palette— global color primitives, named by hue family + numeric lightness step (Tailwind-aligned:blue,slate,gray,teal). The canonical naming layer.theme.css— the canonical semantic web theme: canvas, surfaces, text, borders, interaction states, status colors, sidebar, radii and elevation for light and dark modes. Tailwind consumers should import this file rather than redefining semantic values locally.mobileColors— the mobile app's derived dark-theme palette (semantic aliases ofpalette).
Ownership model
The design system is intentionally split by responsibility:
@devpraxis/design-tokensowns visual values and their semantic meaning.@devpraxis/brand-assetsowns logos, mascot artwork, favicons and other versioned binary/vector brand files.@flowchat/uiowns reusable component recipes that consume the semantic tokens without redefining them.- Product applications own layout, content and feature behavior. They should not introduce product-local palette values or copy brand assets by hand.
This separation lets landing, login, app shell, settings modals and feature modules evolve from one documented reference while keeping assets and code on independent release cycles.
Palette nomenclature
The global layer names colors by what they are (hue + lightness step), not
by marketing name or usage. Steps follow the Tailwind 100–950 lightness
convention so they read natively in the Tailwind consumers. The invented-name
brand export (flow, flowDeep, mist, graphite, accent) was removed
in v0.2.0 — all consumers are ours, so they migrate in lockstep instead of
carrying deprecated aliases. No value changed in this migration — only names:
| Token | Hex | Pre-0.2.0 name |
| ------------ | --------- | --------------------------------- |
| blue[300] | #70B0FF | mobileColors.primaryLight |
| blue[600] | #006CF4 | brand.flow |
| blue[950] | #002452 | mobileColors.primaryDark |
| slate[800] | #283248 | mobileColors.surfaceRaised |
| slate[900] | #1C2333 | brand.graphite |
| slate[950] | #0D1426 | brand.flowDeep |
| gray[100] | #F2F4F7 | brand.mist |
| gray[400] | #9CA3AF | mobileColors.muted / inactive |
| gray[500] | #6B7280 | mobileColors.dimmed |
| teal[500] | #00D4B4 | brand.accent |
blue is the saturated brand hue, slate is the desaturated dark-neutral
ramp on the same ~223° hue, and gray is true neutral. The marketing names
("Azul Flow", "Grafite", …) live on in the brand guide
(docs/brand/colors.md in the flowchat monorepo) — they're just no longer
API.
Web apps with a CSS pipeline should import the shared semantic theme:
@import "tailwindcss";
@import "@devpraxis/design-tokens/theme.css";Consumer-local theme declarations are reserved for runtime-specific concerns
such as Next.js font variables and page animations. See
docs/brand/colors.md in the flowchat monorepo for the token architecture and
WCAG contrast rationale.
Development
npm install
npm run build # emit dist/ (compiled JS + .d.ts)
npm run typecheck
npm run lint
npm run format:checkVersioning
Manual semver bump in package.json, in the same PR that changes a value —
no changesets. Bump whenever src/index.ts changes; publishing is idempotent
(a push with an unchanged version is a no-op), so a content change without a
version bump silently never reaches consumers — double-check the version
line before merging.
