How it works
Website sync requires this widget setting:- Theme = Auto
- Remapdb detects your website theme.
- It sends the resolved theme (
lightordark) to the widget. - Widget applies it without reloading.
Automatic theme detection
Remapdb resolves your website theme using this priority:data-bs-themeon<html>data-bs-themeon<body>- Computed
color-schemeon page root - Explicit theme classes (
dark,light,theme-dark,theme-light, etc.) - Rendered page background luminance
prefers-color-schememedia query fallback
Programmatic control from your theme switcher
Option A: API call
Option B: Custom event
Typical integration with a website theme switcher
Debug checklist
- Ensure widget setting is Theme = Auto.
- Confirm your page actually exposes a theme signal (
data-bs-theme, classes, or clear light/dark surface styles). - Enable debug logs in widget settings and inspect browser console.
- If using custom switchers, always call
window.RDBWidget.setTheme(...)after your site theme changes.