--uit-color-text-secondary means “supporting text,” not a particular gray. Role-based choices let the toolkit evolve while applications retain the intended hierarchy, contrast, and rhythm.Use semantic tokens: Use the toolkit’s semantic tokens for colors, typography, spacing, corner radii, icon sizes, opacity, and elevation. Avoid hardcoded resolved values, including values that resemble plain white, black, transparent, or a familiar dimension.
App loads the stylesheet that makes the complete --uit- custom-property namespace available on :root. The toolkit does not expose resolved color, spacing, or typography values through a JavaScript object. The CSS custom properties, uit-* utility classes, and component role enums form the public token surface.TextAppearance is the only exported token-like object in this surface, and it contains class names rather than values. Two groups differ:CornerRadius, because shape providers are configured in TypeScript. See Corner radius.--uit-spacing-* scale runs from smallest to largest:--uit-spacing-2xs --uit-spacing-xsmall --uit-spacing-small --uit-spacing-sm-med --uit-spacing-medium --uit-spacing-med-lg --uit-spacing-large --uit-spacing-xlarge --uit-spacing-2xl --uit-spacing-3xl --uit-spacing-4xl --uit-spacing-5xl
--uit-corner-radius-xxsmall --uit-corner-radius-xsmall --uit-corner-radius-small --uit-corner-radius-medium --uit-corner-radius-large --uit-corner-radius-xlarge --uit-corner-radius-2xlarge --uit-corner-radius-3xlarge --uit-corner-radius-full
--uit-corner-radius-full for a pill shape. See Corner radius for the complete scale and shape guidance.--uit-icon-2xs --uit-icon-xsmall --uit-icon-small --uit-icon-medium --uit-icon-large --uit-icon-xlarge --uit-icon-2xl
| Token | Role |
|---|---|
--uit-enabled-opacity | Opacity of an enabled control. |
--uit-disabled-opacity | Opacity of a disabled control. |
--uit-elevation-default | Shadow blur at rest. |
--uit-elevation-focused | Shadow blur while targeted by focus. |
--uit-elevation-pressed | Shadow blur while pressed. |
--uit-color- prefix in the stylesheet.| Family | Roles |
|---|---|
Text | --uit-color-text-primary, -secondary, -placeholder, -active-hover, -accent, -inverse |
Icon | --uit-color-icon-primary, -secondary, -placeholder, -active-hover, -accent, -inverse |
Border | --uit-color-border-primary |
Background | --uit-color-background-window, -surface, -elevation1, -elevation2, -elevation3, -backface, -inset, -inset2, -flat, -shade, -track, -input-field, -input-field-primary, -message-inbound, -message-outbound |
Interactive | --uit-color-interactive-stroke-idle, -stroke-targeted, -stroke-pressed, -stroke-highlight, -fill-pressed, -text-highlight, -text-edit |
Button | --uit-color-button-primary-background, -secondary-background, -primary-targeted-background, -primary-targeted-highlight, -toggle-active-icon, -toggle-active-background |
Control | --uit-color-control-idle, -active, -active-background |
Status | --uit-color-persistent-action, -positive, -warning, -negative, -info, -active, -caution, -unread, -notification, -recording, -inactive |
Loading | --uit-color-loading-content, --uit-color-loading-glimmer |
Container | --uit-color-container-primary-*, --uit-color-container-secondary-*, --uit-color-container-message-inbound-*, --uit-color-container-message-outbound-*, --uit-color-container-glow |
Accent | --uit-color-accent-red, -orange, -yellow, -olive, -green, -shamrock, -teal, -cyan, -blue, -indigo, -purple, -violet, -pink, -rose, -gray |
--uit-color-background-elevation3 is reserved within the elevation ramp, and the material system consumes the --uit-color-container-* roles. Use the material APIs to customize material paint instead.uit-text-numeral1 uit-text-numeral2 uit-text-display1 uit-text-heading1 uit-text-heading2 uit-text-body1 uit-text-body1-emphasized uit-text-body2 uit-text-body2-emphasized uit-text-label uit-text-label-emphasized uit-text-meta1 uit-text-meta1-emphasized uit-text-meta2 uit-text-meta2-emphasized uit-text-meta3
TextAppearance object maps a constant to each class name:import { TextAppearance } from '@wearables-ui-toolkit/mrbd';
<p className={TextAppearance.META2}>Updated moments ago</p>
import {
AnimationDurations,
Interpolators,
createTransition,
} from '@wearables-ui-toolkit/mrbd';
const transition = createTransition(
'opacity',
AnimationDurations.CONTAINER_STATE_CHANGE,
Interpolators.CONTAINER_SCALE,
);
.summary-block {
display: flex;
flex-direction: column;
gap: var(--uit-spacing-med-lg);
padding: var(--uit-spacing-large);
border-radius: var(--uit-corner-radius-medium);
}
.summary-block__meta {
color: var(--uit-color-text-placeholder);
}
import { TextColor, TextStyle, TextView } from '@wearables-ui-toolkit/mrbd';
<TextView textStyle={TextStyle.BODY1}>Route updated</TextView>
<TextView textStyle={TextStyle.META2} textColor={TextColor.SECONDARY}>
2 MINUTES AGO
</TextView>
IconTintColor, SubtitleTextColor, and TimestampTextColor. These enums resolve to the same underlying color roles.TextView and other toolkit components apply both pieces when the secondary role is selected. For custom markup or inline SVG, apply the public utility class:<p className="uit-text-body2 uit-color-text-secondary">Supporting details</p>
<svg className="uit-color-icon-secondary" aria-hidden="true">
{/* Paths paint with currentColor. */}
</svg>
currentColor for the icon utility to color it. Avoid applying the icon utility to full-color bitmap or brand artwork.min(), max(), clamp(), grid tracks, and shadow syntax. Changing an arbitrary value to em or rem does not make it semantic.