Skip to main content

Design Tokens

Every token is a CSS custom property. They are defined on :root (and also on .cr-theme for scoped usage) by chromium-ui-react/styles.css.

Google color palette

TokenLightDark
--google-blue-500#4285f4#4285f4
--google-blue-600#1a73e8#1a73e8
--google-green-600#1e8e3e#1e8e3e
--google-red-600#d93025#d93025
--google-yellow-400#fcc934#fcc934
--google-grey-500#9aa0a6#9aa0a6

Full palette: blue, green, grey, red, yellow (50–900), purple/pink/cyan (100/500/900).

Semantic colors

TokenUse
--cr-fallback-color-primaryPrimary brand color (buttons, links, checked states)
--cr-fallback-color-on-primaryForeground on primary surfaces
--cr-fallback-color-surfaceDefault page/card background
--cr-fallback-color-surface-1Subtle tinted background
--cr-fallback-color-surface-variantBorders, disabled backgrounds
--cr-fallback-color-on-surfacePrimary text color
--cr-fallback-color-on-surface-subtleSecondary text color
--cr-fallback-color-outlineDefault border color
--cr-fallback-color-errorError/destructive color
--cr-fallback-color-disabled-backgroundDisabled element background
--cr-fallback-color-disabled-foregroundDisabled element text

State colors

TokenValue
--cr-hover-background-color6% overlay on current on-surface
--cr-active-background-color10% overlay on current on-surface
--cr-focus-outline-color--cr-fallback-color-primary

Layout & spacing

TokenValue
--cr-space-14px
--cr-space-28px
--cr-space-312px
--cr-space-416px
--cr-space-520px
--cr-space-624px
--cr-space-832px
--cr-space-1040px

Border radius

TokenValue
--cr-radius-xs2px
--cr-radius-sm4px
--cr-radius-md8px
--cr-radius-lg16px
--cr-radius-xl24px
--cr-radius-full100px (pill)

Typography

TokenValue
--cr-font-familyRoboto, 'Google Sans', 'Segoe UI', system-ui, -apple-system, sans-serif
--cr-font-family-mono'Roboto Mono', 'Courier New', Courier, monospace
--cr-font-size-xs11px
--cr-font-size-sm12px
--cr-font-size-md13px (Chromium default body)
--cr-font-size-base14px
--cr-font-size-lg16px
--cr-font-size-xl20px
--cr-font-size-2xl24px
--cr-font-weight-regular400
--cr-font-weight-medium500
--cr-font-weight-bold700

Elevation

TokenUse
--cr-elevation-1Default card shadow
--cr-elevation-2Hovered card, small menu
--cr-elevation-3Dropdown menu, popovers
--cr-elevation-4Large popover
--cr-elevation-5Modal dialog
--cr-card-shadowAlias for --cr-elevation-1

Animation

TokenValue
--cr-transition-duration80ms (Chromium-standard) — 0ms if prefers-reduced-motion: reduce

Forced dark mode

To opt out of prefers-color-scheme and force a theme:

<div data-cr-theme="dark">...</div>