Foundation · Design Tokens v2
White-Labeling Guide
Enterprise customers can override semantic tokens to match brand identity without forking the design system. One API, 24 overrideable fields, full dark-mode support.
How It Works
1
Call createTheme()
Pass your brand colors, radius, and typography overrides. All other tokens default to the Nodus base theme.
2
Serialize to CSS
Use serializeThemeToCss() to get a CSS string. All values are developer-authored — safe for injection into a style tag.
3
Scope or global
Inject to :root for global brand, or to a CSS selector for per-tenant/per-page scope in multi-org apps.
Example Themes
Theme Config
{
"id": "acme-corp",
"colors": {
"agency": "#0055CC",
"agencySubtle": "#E6EFFF",
"agencyFg": "#FFFFFF",
"temporal": "#5C6BC0",
"temporalSubtle": "#EEF0FF"
},
"radius": {
"sm": "2px",
"md": "4px",
"lg": "6px"
}
}Integration Code
import { createTheme, serializeThemeToCss } from "@nodus-ds/tokens";
const acmeTheme = createTheme({
id: "acme-corp",
colors: {
// Override intent colors to match brand
agency: "#0055CC", // Acme blue instead of Nodus red
agencySubtle: "#E6EFFF",
agencyFg: "#FFFFFF",
// Leave temporal/validation/surface as Nodus defaults
},
radius: {
sm: "2px", // Conservative radius for financial context
md: "4px",
lg: "6px",
},
});
// Serialize to CSS string for injection
const cssText = serializeThemeToCss(acmeTheme, ":root");Overrideable Fields
All fields are optional — defaults are the Nodus base theme. Override only what your brand requires.