Animations & Dark Mode

CookieBoss supports smooth banner animations, automatic dark mode, and a built-in WCAG contrast checker to help you create an accessible, polished consent experience.

Available animation types

AnimationDescription
noneBanner appears instantly with no animation
fadeFades in from transparent to opaque
slide-upSlides in from below the viewport
slide-downSlides in from above the viewport
slide-leftSlides in from the left edge
slide-rightSlides in from the right edge

All animations are CSS-based with smooth easing for a polished feel. They run once when the banner first appears.

How to set

  1. Open your site’s Banner Editor
  2. Find the Animation section
  3. Select your preferred animation type
  4. Preview the animation in the live preview
  5. Click Save then Publish

Accessibility: reduced motion

CookieBoss respects the prefers-reduced-motion media query. When a visitor has enabled “Reduce motion” in their operating system settings, all banner animations are automatically disabled and the banner appears instantly. This ensures your consent banner is accessible to visitors with motion sensitivities.

Dark mode

Available modes

ModeBehavior
OffBanner always uses your configured light colors
AutoFollows the visitor’s system preference using the prefers-color-scheme: dark media query
Always OnBanner always uses the dark palette

How to set

  1. Open your site’s Banner Editor
  2. Find the Dark Mode section
  3. Select your preferred mode: Off, Auto, or Always On
  4. Preview both light and dark versions in the editor
  5. Click Save then Publish

Dark palette

When dark mode is active, the banner renders with a dark background and light text. The dark palette is derived from your configured colors — CookieBoss automatically adjusts contrast to keep text readable against the darker background.

You can preview the exact dark mode appearance in the Banner Editor by toggling between light and dark preview modes.

WCAG Contrast Checker

The Banner Editor includes a built-in contrast checker that helps you meet accessibility standards.

What it checks

The checker evaluates contrast ratios for three elements:

  • Text and background — your body text against the banner background
  • Buttons — button text against button background colors
  • Links — link text against the banner background

Pass/fail standards

StandardRatioUse case
WCAG AA4.5:1Minimum for normal-sized body text
WCAG AAA7:1Enhanced accessibility for all users

Each element displays a pass or fail badge for both AA and AAA standards, so you can see at a glance whether your color choices meet accessibility requirements.

How it works

The contrast checker runs automatically as you change colors in the Banner Editor. There’s nothing to enable — just adjust your colors and watch the pass/fail badges update in real time.

Aim for AA compliance

The WCAG contrast checker runs automatically as you change colors. Aim for at least AA compliance (4.5:1 ratio) for body text. AAA compliance (7:1 ratio) is recommended for the best accessibility, but AA is the widely accepted minimum.

API configuration

You can set animation and dark mode via the API:

PUT /api/v1/sites/:siteId/config json
{
"banner": {
  "animation": "slide-up",
  "darkMode": "auto"
}
}

Animation values

"none", "fade", "slide-up", "slide-down", "slide-left", "slide-right"

Dark mode values

"off", "auto", "always"