Namespace your theme using the
bq-theme attribute (e.g., bq-theme="my-custom-theme") or a matching CSS class (e.g., .my-custom-theme).Step-by-step guide
1
Define base theme variables
Create a CSS file for your custom theme (e.g.,
custom-theme.css) and set the base design tokens:2
Define light mode theme
Define the declarative color tokens for the light mode:
3
Define dark mode theme
Define the declarative color tokens for the dark mode:
4
Apply your custom theme
Include your custom theme CSS file in your project and set the Pick the setup that matches your project:The To switch to dark mode, change the You can also use CSS classes instead of HTML attributes:
bq-theme and bq-mode attributes on the <html> element.Always load
beeq.css before your custom theme CSS so that your variables correctly override the defaults.@beeq/tailwindcss preset maps BEEQ tokens to Tailwind utility classes but does not define your custom theme. Keep the custom theme CSS as a separate file that overrides --bq-* variables, and load it after beeq.css.Set the theme and mode on the root element from your app entry so the attributes are present before any component renders:bq-mode attribute: