Skip to main content
To create a custom theme, define your own set of CSS variables that override the base theme variables and declarative colors for both light and dark modes.
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:
Override --bq-state--hover and --bq-state--active for each mode. In dark mode, use light overlays (e.g. rgba(255, 255, 255, 0.1)) instead of dark ones.
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 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.
Pick the setup that matches your project:
The @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:
To switch to dark mode, change the bq-mode attribute:
You can also use CSS classes instead of HTML attributes:
For a full React setup — packages, styles, icons, and event handling — see the React framework guide. For the Tailwind utility classes that BEEQ ships alongside your custom theme, see Colors → Tailwind CSS.

Full example: TechFlow theme

Here is an almost production-ready custom theme called TechFlow — a theme with vibrant teal accents and a sleek design aesthetic.