Explore related sections: Colors, Global CSS Variables, and Customization.
Applying themes
BEEQ lets you apply themes using either HTML attributes (recommended) or CSS classes, ensuring a consistent look for every application.Using HTML attributes
Set thebq-theme attribute on the <html> element (recommended) or the <body> tag.
Using CSS classes
Alternatively, apply themes using CSS classes directly on the root element.When applying a theme, maintain consistency and avoid mixing different themes throughout the app.
Applying modes
Modes let you switch between light and dark color schemes to match user preferences or specific app needs. You can control modes globally or for specific sections using HTML attributes or CSS classes.Using HTML attributes
Set thebq-mode attribute to control the color scheme.
Using CSS classes
Combining modes
You can mix and match modes at various levels of your layout. For instance, you might use dark mode for the main section of your app and switch to light mode for a nested component.User’s color scheme preferences
BEEQ does not automatically detect or apply the user’s preferred color scheme. It is up to you to control whether users see light or dark mode in your app. To provide a better experience:- Make the
prefers-color-schemesetting your default. - Allow users to switch this option in your app.
- Remember their choice and apply it when they log in or return to the app.
prefers-color-scheme media query is not used by BEEQ automatically, as not all applications support dark mode, which might cause problems for those that don’t.
Example
Here is a working example showing how to read the user’s preferred color scheme on load and let them toggle it using abq-switch.
Endava theme
Theendava theme follows the Endava brand portal, the Endava brand guide, and the color tokens used on endava.com. It keeps the brand’s colors wherever they meet WCAG 2.1 Level AA, and uses a nearby shade where they don’t.
- Brand and accent: Red Orange
#FF5640is the brand fill. Accent aliases the brand, so--bq-accent-*matches--bq-brand-*. - Brand text:
--bq-brand-strong(light mode text, icons, strokes, and focus) and--bq-brand-bright(dark mode) are both Red Orange#FF5640, so brand text and indicators match the brand fill, as on endava.com. Contrast limits are listed in the deviation log. - Neutrals: Solid Blue
#192B37is the darkest neutral (--bq-neutral-950).--bq-blackis the slightly darker#14222C(--bq-endava-grey-1000), so on-colors reach more contrast on the dark mode fills. - Info: uses the endava.com accent blues so it stays distinct from neutral UI. Mid Blue
#417191is the light mode fill,#3B6684is light mode text, and#9DCFF0(a tint of Bright Blue#68B5E8) is dark mode text and fill. - Dark mode fills: info, success, warning, and danger fills use their
-brightstep, with--bq-black(#14222C) as the on-color. - Signal colors: dark mode success and warning use the brand guide’s dark Positive
#3DD17Band Warning#F99C11for text, icons, strokes, and fills. Dark danger is the brand Negative#E84641. Light mode signal colors use nearby shades. Contrast limits and overrides are listed in the deviation log. - Data colors: come from the brand portal palette. The brand asks for primary colors and Solid Blue shades first, so start charts with
--bq-data-01(Red Orange),--bq-data-11(Solid Blue),--bq-data-12(white), and--bq-neutral-*shades. Add--bq-data-02to--bq-data-10only when you need more series.
In the Endava theme, use
--bq-text--secondary only on --bq-background--primary, --bq-background--secondary, --bq-ui--primary, and --bq-ui--secondary. On other surfaces, such as --bq-ui--tertiary or the intent tints, it can fall below 4.5:1.Where BEEQ differs from the brand
Deviation log
Deviation log
Next steps
Custom Theme
Follow the step-by-step guide to create and apply a fully custom theme to your app.
Global CSS Variables
Explore the color tokens and base variables that power BEEQ themes and modes.