Brands and white-label
Keep several brands over one set of components, and keep brand names out of shared code.
Several brands
Brands share one semantic interface and differ in their foundations. Each brand is a file, brands/<name>.brand.json.
sketchbook brand add acme
sketchbook brand list
sketchbook brand use acme --dry-run
sketchbook brand build
addsaves the currentbrand.config.jsonas a brand, or copies another with--from <brand>.usecopies a brand intobrand.config.jsonand regenerates. It asks for--yeswhen that would overwrite edits saved in no brand file, or clear foundation overrides.buildwritesgenerated/css/tokens.<brand>.cssfor every brand, so one page can load the one it needs.
sketchbook doctor lists the brands in the project.
Keep brand names out of shared code
Check W1 fails when a protected term appears in components, stories, tests or contracts, so a design system built for one client does not leak that client's name into reusable code. Two lists feed it:
| List | Where | Travels with the repo |
|---|---|---|
| Shared terms | harness.config.json, whiteLabel.forbiddenTerms |
Yes |
| Local terms | .sketchbook-forbidden-terms (one per line) or SKETCHBOOK_FORBIDDEN_TERMS (comma-separated) |
No, the file is untracked |
Warning
A fresh clone or a new worktree does not have the local file, so W1 passes there with fewer terms. Put terms every contributor must follow in
harness.config.json, or pass the variable in CI.
W1 also keeps the visual reference named only in a contract's source: line and its drift notes; everything else is written in your own words.
Next steps
- Checks: W1 and the rest of the list.
- Config files:
harness.config.jsonandbrands/.