You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dialtone has four theming dimensions: **mode** (light/dark), **brand** (the color palette), **material** (the neutral ramp), and **contrast** (default/high). Each switches at runtime via `@dialpad/dialtone/themes/config`. See the [Theme and Mode guide](https://dialtone.dialpad.com/guides/theme-and-mode/) for the full API.
Most brands declare a paired material via the `shell.base.material` token in their token JSON. `setBrand` auto-applies the locked material in the same paint frame. Free-choice brands (`dp`, `tmo`, `prota-deuter`, `trita`) keep material independent.
@@ -129,29 +134,18 @@ See [Mode Island component](https://dialtone.dialpad.com/components/mode-island.
129
134
130
135
##### Legacy Theming System (Backward Compatible)
131
136
132
-
The original theming system remains fully supported for existing projects. New projects should use the layered system above for better performance and smaller bundle sizes.
133
-
134
-
**Note:** Both systems support Shadow DOM identically - pass the host element as the second parameter.
137
+
The original `setTheme()` API remains supported for existing projects. New projects should use the layered system above for smaller bundle sizes and finer-grained switching across all four dimensions.
setTheme(DpLight, document.querySelector('#my-shadow-root-host')); // Shadow DOM support
148
146
```
149
147
150
-
**Legacy themes available:**
151
-
152
-
-`DpLight`, `DpDark`, `TmoLight`, `TmoDark`
153
-
154
-
**Note:** Legacy system loads complete token files (~1256KB per theme). Consider migrating to layered system for better performance.
148
+
**Legacy themes:**`DpLight`, `DpDark`, `TmoLight`, `TmoDark` — each ships the complete token set (~1256KB per theme), versus the layered system's small per-dimension overrides.
0 commit comments