Skip to content

Enterprise Multi-Brand

2 brands × 2 themes × 2 densities × 4 platforms = many permutations. Enterprise token systems need to scale across brands, themes, and platforms without combinatorial duplication.

Organize your resolver with sets for base tokens and modifiers for brand, theme, and density:

{
"version": "2025.10",
"sets": {
"base": {
"sources": [
{ "$ref": "./tokens/base/colors.json" },
{ "$ref": "./tokens/base/spacing.json" }
]
},
"alias": {
"sources": [{ "$ref": "./tokens/semantic/aliases.json" }]
}
},
"modifiers": {
"brand": {
"default": "acme",
"contexts": {
"acme": [{ "$ref": "./tokens/brands/acme.json" }],
"globex": [{ "$ref": "./tokens/brands/globex.json" }]
}
},
"theme": {
"default": "light",
"contexts": {
"light": [{ "$ref": "./tokens/themes/light.json" }],
"dark": [{ "$ref": "./tokens/themes/dark.json" }]
}
}
},
"resolutionOrder": [
{ "$ref": "#/sets/base" },
{ "$ref": "#/modifiers/brand" },
{ "$ref": "#/modifiers/theme" },
{ "$ref": "#/sets/alias" }
]
}

Build only the permutations you need instead of the full cross-product:

await dispersa.build({
permutations: [
{ brand: 'acme', theme: 'light' },
{ brand: 'acme', theme: 'dark' },
],
outputs: [
css({
name: 'tokens',
file: '{brand}/tokens-{theme}.css',
preset: 'standalone',
// ...
}),
],
})

This produces acme/tokens-light.css and acme/tokens-dark.css without building globex or other combinations.

Dynamic File Naming with Multiple Modifiers

Section titled “Dynamic File Naming with Multiple Modifiers”

Use placeholders for each modifier in the file path:

file: '{brand}/tokens-{theme}.css'

Produces: acme/tokens-light.css, acme/tokens-dark.css, globex/tokens-light.css, etc.

  • Keep base tokens brand-agnostic — shared spacing, typography, and structure
  • Use semantic aliasescolor.background.primary that brands override with concrete values
  • Resolution order matters — modifiers listed later override earlier ones