This example demonstrates the dark mode capabilities of the Flyout Menu library. Use the theme buttons in the top-right corner to switch between light, dark, and auto modes.
// Initialize
FlyoutTheme.init();
// Set theme
FlyoutTheme.setTheme('dark');
FlyoutTheme.setTheme('light');
FlyoutTheme.setTheme('auto');
// Toggle
FlyoutTheme.toggle();
// Get current
FlyoutTheme.getTheme();
// Watch system
FlyoutTheme.watchSystemTheme();
:root {
--flyout-bg: #ffffff;
--flyout-border-color: #dee2e6;
--flyout-text-color: #212529;
--flyout-hover-bg: #f8f9fa;
--flyout-hover-text: #212529;
--flyout-active-bg: #e9ecef;
--flyout-focus-outline: #0d6efd;
--flyout-shadow: rgba(0, 0, 0, 0.15);
}
[data-bs-theme="dark"] {
--flyout-bg: #212529;
--flyout-border-color: #495057;
--flyout-text-color: #dee2e6;
--flyout-hover-bg: #343a40;
--flyout-hover-text: #ffffff;
--flyout-active-bg: #495057;
--flyout-focus-outline: #0d6efd;
--flyout-shadow: rgba(0, 0, 0, 0.5);
}