Skip to content About The people and vision powering Probo Blog The latest news from Probo Stories Hear from our customers Changelog Latest product updates Docs Documentation for Probo GitHub Explore our open-source compliance tools

Theming

The themed banner (both the script tag and the ES module) renders inside a Shadow DOM and exposes CSS custom properties for styling. You can override these properties to match your brand without writing any JavaScript.

Add a <style> block or CSS file targeting the probo-cookie-banner element:

probo-cookie-banner {
--probo-font-family: "Inter", sans-serif;
--probo-font-size: 14px;
--probo-bg: #ffffff;
--probo-text: #1a1a1a;
--probo-text-secondary: #555555;
--probo-border: #e0e0e0;
--probo-radius: 12px;
--probo-btn-radius: 8px;
--probo-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
--probo-accent: #1a1a1a;
--probo-accent-text: #ffffff;
--probo-overlay: rgba(0, 0, 0, 0.4);
--probo-z-index: 2147483646;
}
PropertyDefaultDescription
--probo-font-familySystem font stackFont family for all banner text
--probo-font-size14pxBase font size
--probo-bg#ffffffBanner background color
--probo-text#1a1a1aPrimary text color
--probo-text-secondary#555555Secondary text color (descriptions, labels)
--probo-border#e0e0e0Border color for cards and separators
--probo-radius12pxBorder radius for the banner container
--probo-btn-radius8pxBorder radius for buttons
--probo-shadow0 4px 24px rgba(0,0,0,0.12)Box shadow for the banner
--probo-accent#1a1a1aAccent color for primary buttons and toggles
--probo-accent-text#ffffffText color on accent-colored elements
--probo-overlayrgba(0,0,0,0.4)Background overlay color when the preference panel is open
--probo-z-index2147483646Z-index for the banner layer

Use a media query to switch to dark mode colors automatically:

@media (prefers-color-scheme: dark) {
probo-cookie-banner {
--probo-bg: #1a1a1a;
--probo-text: #f0f0f0;
--probo-text-secondary: #a0a0a0;
--probo-border: #333333;
--probo-accent: #f0f0f0;
--probo-accent-text: #1a1a1a;
--probo-overlay: rgba(0, 0, 0, 0.6);
}
}

Or use a CSS class if you manage dark mode manually:

.dark probo-cookie-banner {
--probo-bg: #1a1a1a;
--probo-text: #f0f0f0;
--probo-text-secondary: #a0a0a0;
--probo-border: #333333;
--probo-accent: #f0f0f0;
--probo-accent-text: #1a1a1a;
}

The Probo console includes a visual theme editor on the JS / CSS snippets tab of your banner configuration. It lets you:

  • Adjust each CSS custom property with color pickers and input fields
  • Preview the banner appearance in real time
  • Copy the generated CSS to paste into your website
  • Reset to defaults at any time

This is the easiest way to experiment with theming before committing to a design.