App loads the packaged stylesheet, which declares every --uit-* property at the document root for components to read. Override supported properties with ordinary CSS rules.useTheme hook, and no provider that carries design values. Only three theme identifiers are exported from the package:| Export | Kind | What it is |
|---|---|---|
TextAppearance | Constant | A map from appearance name to the CSS class that implements the appearance. |
TextAppearanceKey | Type | The union of the map’s keys, such as 'BODY1'. |
TextAppearanceValue | Type | The union of the class-name strings the map holds. |
import { TextAppearance } from '@wearables-ui-toolkit/mrbd';
<figcaption className={TextAppearance.META2}>Source</figcaption>
TextColor, TextStyle, IconTintColor, SurfaceCornerRadius, or CornerRadius. Component enums are values you pass to a component or a shape provider, not a general way to read design values in JavaScript.getIconTintCSSVariable and getTimestampTextCSSVariable, which resolve a tint enum to a var(--uit-…) string for custom content. They are documented on the Colors page.| Layer | Scope | Contents |
|---|---|---|
Design tokens | Document root | Every --uit-* color, spacing, corner-radius, icon-size, opacity, and elevation property. |
Component metrics | Document root | Per-component anatomy variables that a single component reads. |
Text appearances | Global classes | The uit-text-* appearance classes. |
Secondary foreground utilities | Global classes | uit-color-text-secondary and uit-color-icon-secondary. |
Element reset and base styles | Toolkit subtree only | Box sizing, margin and padding reset, the text face, and the window background and primary text color. |
App marks with data-app-root, and it carries no specificity weight, so it neither leaks into the surrounding document nor overrides component styles.| Group | Reference |
|---|---|
Colors | |
Typography | |
Spacing and icon sizes | |
Corner radius | |
Opacity | --uit-disabled-opacity, --uit-enabled-opacity |
Elevation blur | --uit-elevation-default, --uit-elevation-focused, --uit-elevation-pressed |
App paints its own root with var(--uit-color-background-window), but the document behind it is yours. Give html, body, and the mount root the same role so nothing shows through at the edges or during a route transition:html,
body,
#root {
height: 100%;
background-color: var(--uit-color-background-window);
}
[data-app-root] for the whole application:[data-app-root] {
--uit-color-text-accent: var(--app-color-accent);
--uit-color-persistent-action: var(--app-color-action);
}
App forwards className and style to that same root element, so an override can also travel with the component tree instead of relying on the attribute selector:import { App } from '@wearables-ui-toolkit/mrbd';
<App className="product-theme">{/* routes */}</App>
.product-theme {
--uit-color-text-accent: var(--app-color-accent);
}
.product-status {
--uit-color-text-accent: var(--app-color-status-accent);
}
App rather than inside the element that owns it, so it picks up an override made on the App root but not one made on a deeper subtree. When an override has to reach a portaled surface, apply it on the App root — either through [data-app-root] or through the class you passed to App.ContainerMaterial to a material host instead of overriding colors. A token override and a material are not interchangeable.