一键导入
brand-theming
Multi-brand token sets and white-label pipelines for mobile design systems. Use this when adding a new brand or building a themeable product.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Multi-brand token sets and white-label pipelines for mobile design systems. Use this when adding a new brand or building a themeable product.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Android adaptive icons and iOS app icon light/dark/tinted modes. Use this when creating or revising app launcher icons.
Cross-platform icon pipeline — SVG source, Android VectorDrawable, SF Symbols, Flutter/RN delivery, sizing, and parity. Use this when adding or refactoring the icon set.
Scalable, theme-aware illustrations for mobile — pipeline, tokenization, and platform delivery. Use this when authoring or shipping illustrations.
Structuring a cross-platform component library into primitives, patterns, and compositions with predictable folder layout and public API. Use this when starting or reorganizing a component library.
Slots, compound components, and headless primitives for flexible mobile component APIs. Use this when a component needs to serve many callers without becoming a grab-bag of props.
Modeling component variants as a closed matrix of size × intent × state, with explicit enums and slot APIs. Use this when designing or refactoring a component's public API.
| name | brand-theming |
| description | Multi-brand token sets and white-label pipelines for mobile design systems. Use this when adding a new brand or building a themeable product. |
A brand is a token set, not a code fork. A clean brand pipeline lets you ship N brands from one codebase, one component library, and one CI job.
Keep the system and component layers shared. Overlay only the reference and, rarely, system layers per brand.
tokens/
├── base/
│ ├── reference/
│ ├── system/
│ └── component/
└── brands/
├── acme/
│ ├── reference.override.json # brand hues, brand fonts
│ └── system.override.json # optional intent remaps
└── globex/
└── reference.override.json
Style Dictionary resolves base → brand so the brand overlay wins.
A brand usually needs to control:
Do not let brands change spacing scale, breakpoints, or component APIs.
{
"brand": {
"name": { "$value": "Acme" },
"hue": {
"primary": { "$value": "#4F46E5" },
"secondary": { "$value": "#14B8A6" }
},
"font": {
"family": { "$value": ["Acme Sans", "Inter", "system-ui"] }
},
"radius": {
"personality": { "$value": "12px" }
}
}
}
The build regenerates color.brand.0..100 from hue.primary using the HCT palette generator.
// scripts/build-brand.js
const StyleDictionary = require('style-dictionary');
const brands = ['acme', 'globex'];
for (const brand of brands) {
StyleDictionary.extend({
source: [
'tokens/base/**/*.json',
`tokens/brands/${brand}/**/*.json`,
],
platforms: {
android: { transformGroup: 'compose', buildPath: `build/${brand}/android/`, files: [/* ... */] },
ios: { transformGroup: 'ios-swift', buildPath: `build/${brand}/ios/`, files: [/* ... */] },
flutter: { transformGroup: 'flutter', buildPath: `build/${brand}/flutter/`,files: [/* ... */] },
rn: { transformGroup: 'js', buildPath: `build/${brand}/rn/`, files: [/* ... */] },
},
}).buildAllPlatforms();
}
Apps select a brand at build time (preferred) or at runtime (for white-label tenants).
Build-time (Android flavors):
// build.gradle.kts
flavorDimensions += "brand"
productFlavors {
create("acme") { dimension = "brand"; resValue("string", "brand", "acme") }
create("globex") { dimension = "brand"; resValue("string", "brand", "globex") }
}
Build-time (iOS Xcode config / xcconfig): separate schemes per brand.
Runtime (RN / Flutter white-label):
const BrandContext = createContext<BrandTheme>(acmeTheme);
export const BrandedApp = ({ brandId }: { brandId: string }) => {
const theme = useMemo(() => loadBrand(brandId), [brandId]);
return <BrandContext.Provider value={theme}><Root /></BrandContext.Provider>;
};
assets/brands/<id>/.system or component layers instead of reference.build/<brand>/ output for every platform.