Tokens and theming

Components only read tokens. Override the palette and a few dials after the import, and every component follows without a single file edit. Dark mode is one class.

@import './comwit-tokens.css';

:root {
  --brand: #0b68ba;        /* buttons, links, focus, selection */
  --brand-strong: #08528f;
  --radius-scale: 0.6;     /* every corner, one dial */
  --pill-radius: 12px;     /* buttons and chips stop being pills */
}

Try it

All tokens

Palette

Semantic

--card
--card-foreground
var(--ink)AlertCard
--popover
var(--canvas-overlay)AutocompleteSelect
--primary-foreground
--primary-strong
--primary-ink
var(--brand-ink)
--primary-surface
var(--brand-surface)ToastChipTable
--secondary
var(--surface-subtle)ChipData tableButtonBadge
--secondary-foreground
var(--ink)ChipButtonBadge
--disabled-foreground
--accent-foreground
--selected
var(--fill-strong)Calendar
--skeleton
var(--surface-subtle)Data table
--border-strong
var(--line-strong)
--switch-thumb
#ffffffSwitch
--overlay
--surface-glass
rgba(255, 255, 255, 0.72)Data table
--shadow-card
--shadow-card-hover
var(--elevation-3)AutocompleteSelect

Status

--success
#30a46cToastChip
--success-foreground
#ffffffToastChip
--success-surface
--success-surface-foreground
--success-border
#8eceaaAlertChip
--warning
#f76b15ToastChip
--warning-foreground
#431407ToastChip
--warning-surface
--warning-surface-foreground
--warning-border
#f5ae73AlertChip
--destructive-foreground
--destructive-strong
#c62a2fButton
--destructive-surface
--destructive-surface-foreground
--destructive-border
#f4a9aaAlertChip
--info
#0090ffToastChip
--info-foreground
#ffffffToastChip
--info-surface
--info-surface-foreground
--info-border
#8ec8f6AlertChip

Glass

--glass-tint
rgb(233 235 239)
--glass-opacity
0.38
--glass-veil
#ffffff
--glass-edge
rgba(255, 255, 255, 0.55)
--glass-sheen
rgba(255, 255, 255, 0.9)
--glass-glow
rgba(255, 255, 255, 0.42)
--glass-shade
rgba(10, 10, 10, 0.08)
--glass-shadow
0 2px 4px rgba(16, 24, 40, 0.09), 0 12px 28px rg…

Shape

--radius
10px
--card-radius
16px
--sheet-radius
20px
--pill-radius
9999px
--radius-scale
1
--border-width
1px
--border-width-strong
2px
--focus-ring-width
2px
--focus-ring-offset
2px
--field-ring-width
3px
--spacing
0.25rem

Type

--text-scale
1
--tracking-scale
1
--display-font
var(--font-sans)
--weight-normal
400
--weight-medium
500
--weight-semibold
600
--weight-bold
700

Motion

--duration-instant
75ms
--duration-slower
--press-scale
0.98
--press-scale-thumb
1.1
--ripple-opacity
0.35
--state-hover
0.05
--state-selected
0.1
--state-disabled
0.5
--state-disabled-content
0.4

Elevation

--elevation-0
none
--elevation-1
0 1px 2px rgba(16, 24, 40, 0.04)
--elevation-2
0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba…Segmented controlData tableTabsCard
--elevation-3
0 2px 4px rgba(16, 24, 40, 0.06), 0 10px 28px rg…AutocompleteSelect
--elevation-4
0 4px 12px rgba(16, 24, 40, 0.1), 0 16px 40px rg…
--elevation-5
0 8px 24px rgba(16, 24, 40, 0.12), 0 24px 64px r…
--elevation-raised
0 1px 2px rgba(16, 24, 40, 0.1), 0 1px 3px rgba(…
--elevation-message
0 4px 20px rgba(11, 46, 107, 0.06)
--elevation-panel
0 10px 30px rgba(11, 46, 107, 0.08)

Layers

--z-raised
10
--z-sticky
20
--z-appbar
40
--z-overlay
1000
--z-modal
1100
--z-dropdown
1200
--z-toast
1300

Sizes

--page-gutter
1rem
--menu-min-width
8rem
--picker-width
320px
--appbar-height
56px
--bottom-nav-height
64px