--surface surfaces color
- Default
theme-derived- Derived from
- theme, brandHSL
- Used by
- .ag-banner, .ag-overlay backdrop
- Notes
- purpose: Primary banner backgroundcontrast: WCAG AA against --surface-text
Overriding tokens on
:host { }is the preferred customization method — one override affects all elements that consume the token, and is less likely to break on template updates.
Declare token overrides on the :host pseudo-class. This sets values that cascade to all elements inside the Shadow Root:
:host { --btn-fill: #6366f1; --btn-text: #ffffff; --radius: 8px; --font-family: "Inter", system-ui, sans-serif;}Tokens marked theme-derived get their default value from the selected theme (light/dark). Tokens marked brand-derived get their value from your brand HSL color configured in BannerConfig. You can override either with explicit values.
Surface tokens control backgrounds and borders of the banner card and its nested cards.
Button tokens must be set equally for all three consent buttons (Reject, Accept, Accept selected) — use the base tokens on :host, not per-button class overrides.
Accent tokens control focus rings, link colors, and toggle active states.
Category tokens control the chip toggles and category cards in the settings and detail panels.
The privacy trigger is the floating cookie button that re-opens the banner after consent. It has its own token scope.
Effect tokens control visual decoration: corner radius, drop shadow, backdrop blur, border, and entrance animation.
Typography tokens control font family and size scale across the banner.