ComposeKit Docs
Customisation

Design Tokens

ComposeKit renders inside a .bp-composekit root. Call ComposeKitClient.setTheme() at any point to override CSS custom properties scoped to that root — it never touches the rest of your app's styles.

How it works
Tokens are CSS custom properties (--primary, --radius, etc.) written inline on the .bp-composekit element. Color values can be hex, hsl(), rgb(), or any valid CSS color. Changing tokens at runtime re-renders all widgets automatically — no page reload.
Token map
Token keyCSS variableControls
primary--primaryButtons, active states, links
primaryForeground--primary-foregroundText on primary backgrounds
secondary--secondarySecondary button backgrounds
secondaryForeground--secondary-foregroundText on secondary backgrounds
background--backgroundPage background
foreground--foregroundDefault body text
card--cardCard background
cardForeground--card-foregroundCard text color
popover--popoverPopover / dropdown background
popoverForeground--popover-foregroundPopover text color
muted--mutedSubtle backgrounds
mutedForeground--muted-foregroundPlaceholder / helper text
accent--accentHover / accent backgrounds
accentForeground--accent-foregroundText on accent backgrounds
destructive--destructiveError / delete actions
border--borderCard and layout borders
input--inputInput field border color
ring--ringKeyboard focus ring color
radius--radiusBorder radius (e.g. 0.5rem)
fontFamily--default-font-familyBase font family
spacing--spacingBase spacing unit