Skip to Content
DesignDesign Tokens

Design Tokens

Design tokens are the atomic values that define the visual language of the Mukoko design system. Every token is a CSS custom property defined in globals.css, with light and dark theme variants.

Mineral accent tokens

These five colors are constant across light and dark themes:

TokenValueUsage
--color-cobalt#0047ABPrimary blue, links, CTAs
--color-tanzanite#B388FFPurple accent, brand/logo
--color-malachite#64FFDACyan accent, success states
--color-gold#FFD740Yellow accent, rewards/highlights
--color-terracotta#D4A574Warm accent, community

Usage in Tailwind:

<div className="bg-[var(--color-cobalt)] text-white">Cobalt surface</div> <span className="text-[var(--color-malachite)]">Success text</span>

Semantic color tokens

These tokens adapt between light and dark themes:

TokenLightDarkUsage
--background#FAF9F5#0A0A0APage background
--foreground#141413#F5F5F4Primary text
--card#FFFFFF#141414Card surfaces
--card-foreground#141413#F5F5F4Text on cards
--muted#F3F2EE#1E1E1ESubdued backgrounds
--muted-foreground#5C5B58#9A9A95Secondary text
--primary#141413#F5F5F4Primary interactive
--primary-foreground#FFFFFF#141413Text on primary
--secondary#F3F2EE#1E1E1ESecondary elements
--secondary-foreground#141413#F5F5F4Text on secondary
--accent#F3F2EE#1E1E1EAccent surfaces
--accent-foreground#141413#F5F5F4Text on accent
--destructive#B3261E#F2B8B5Error/danger
--borderrgba(10,10,10,0.08)rgba(255,255,255,0.08)Borders
--inputrgba(10,10,10,0.08)rgba(255,255,255,0.08)Input borders
--ring#141413#F5F5F4Focus ring

Chart color tokens

Theme-adaptive colors for data visualization:

TokenLightDark
--chart-1#4B0082#B388FF (Tanzanite)
--chart-2#0047AB#00B0FF (Cobalt)
--chart-3#004D40#64FFDA (Malachite)
--chart-4#5D4037#FFD740 (Gold)
--chart-5#8B4513#D4A574 (Terracotta)

Use these sequential tokens for chart series to maintain consistent color ordering across all Mukoko apps.

Radius tokens

The radius system uses a base value with calculated variants:

TokenValueUsage
--radius0.75remBase radius (12px)
--radius-smcalc(var(--radius) - 4px)Small elements (badges, chips)
--radius-mdcalc(var(--radius) - 2px)Medium elements (inputs, buttons)
--radius-lgvar(--radius)Standard (cards, dialogs)
--radius-xlcalc(var(--radius) + 4px)Large elements (modals, sheets)
--radius-2xlcalc(var(--radius) + 8px)Extra large (hero cards)
<div className="rounded-sm">Badge</div> <div className="rounded-md">Button</div> <div className="rounded-lg">Card</div> <div className="rounded-xl">Dialog</div>

Typography tokens

TokenValueUsage
--font-sansNoto SansBody text, UI elements
--font-serifNoto SerifDisplay headings, page titles
--font-monoJetBrains MonoCode blocks, CLI output
TokenLightDarkUsage
--sidebar#F3F2EE#141414Sidebar background
--sidebar-foreground#141413#F5F5F4Sidebar text
--sidebar-borderrgba(10,10,10,0.08)rgba(255,255,255,0.08)Sidebar border
--sidebar-accent#E8E7E3#1E1E1ESidebar hover/active
--sidebar-ring#141413#F5F5F4Sidebar focus ring

Using tokens in components

Direct reference

<div className="bg-background text-foreground border border-border rounded-lg p-4"> Content using semantic tokens </div>

With cn() composition

import { cn } from "@/lib/utils" function MyComponent({ className }: { className?: string }) { return ( <div className={cn("bg-card text-card-foreground rounded-lg border border-border p-4", className)}> Content </div> ) }

In CVA variants

const variants = cva("rounded-md transition-colors", { variants: { variant: { default: "bg-primary text-primary-foreground", outline: "border border-border bg-transparent text-foreground", muted: "bg-muted text-muted-foreground", }, }, })

Adding new tokens

  1. Define in :root and .dark blocks in globals.css
  2. Register in the @theme inline block
  3. Use via Tailwind classes — never reference CSS variables directly in component code
Last updated on