Theming AdapTable UI
Summary
- AdapTable ships
light,dark, andosthemes — CSS variables that style Dashboard, Settings Panel, wizards, menus, and popups - Custom branding overrides variables on
:root.ab--theme-lightand:root.ab--theme-darkin your stylesheet — start in DevTools — Theme Builder, then check in exported CSS (see Customising AdapTable Themes) - Shipped light/dark stay in sync with AG Grid theme modes; custom grid branding uses
SystemThemeOptions.AgThemeMode— AG Grid Themes
Find Out More
For how AdapTable UI is built — Base UI, shadcn, Tailwind (twa:), and accessibility — see AdapTable UI Components.
Topics on this Page
| Topic | Summary |
|---|---|
| Designing with DevTools | Theme Builder → export CSS |
| System themes | light, dark, os, index.css |
| Selecting a theme | Runtime UI and persistence |
| Customising | Handbook + variable overrides |
| CSS layers | @layer adaptable in host apps |
| Co-ordinated themes | AdapTable + AG Grid brand demo |
Designing with DevTools
The recommended way to explore branding is DevTools — Theme Builder on a running Grid:
- Tune colours, radius, spacing, and typography with immediate preview
- Open Settings Panel and wizards to validate tokens
- Export CSS and add rules to your application under
:root.ab--theme-light/:root.ab--theme-dark
Hint
Install AdapTable DevTools from the Chrome Web Store — Theme Builder is in the AdapTable tab.
You only need hand-written overrides in source control after you know the values you want; the defaults are fine when they already match your app.
System themes
AdapTable themes are named sets of CSS variables.
| Theme | Behaviour |
|---|---|
light | Default — no CurrentTheme required in Initial Adaptable State |
dark | Dark tokens; when selected, AdapTable applies a matching dark AG Grid theme mode for built-in grid themes |
os | Follows the operating system light/dark preference |
Import AdapTable styles in your app:
import '@adaptabletools/adaptable/index.css';Dark theme
Developer Guide
Setting the dark Theme
Theme: {
CurrentTheme: "dark"
},Set dark as CurrentTheme in the Theme section of Initial Adaptable State
OS theme
- In this demo the
osSystem Theme is selected by default - AdapTable shows dark or light based on your operating system theme
- Switch the operating system theme on your computer and note how AdapTable (and AG Grid) follow.
Selecting a theme
Users can change theme at run time (subject to Entitlements) via:
- Theme Toolbar
- Theme Tool Panel
- Theme Status Bar
- Theme section of the Settings Panel
The last selection is saved in user settings and restored on next load. Developers can react to changes with the ThemeSelected event.
Customising themes
Override CSS variables on the shipped themes — see Customising AdapTable Themes for key variables, component variables, palette, and demos.
Find Out More
Use Referencing Theme Variables when Format Columns and other Adaptable Styles should follow the active theme via var(--ab-color-…).
CSS layers
Adaptable rules live in the adaptable CSS layer.
Caution
If your app uses layers, declare order so your styles can override AdapTable when needed — e.g. @layer reset, adaptable, app, theme. Place adaptable after your reset but before app utilities where appropriate.
Hint
Without layers in your app, global CSS overrides still work — layers only affect cascade among layered sheets.
Find Out More
Tailwind twa: prefix, layer ordering with Tailwind v4, and internal class policy — Theming Technical Reference.
Co-ordinated themes
Custom AdapTable branding plus a custom AG Grid look uses two steps:
- CSS variable overrides on shipped light / dark (Theme Builder or hand-written CSS)
- Custom AG Grid theme modes with
AgThemeModeon each entry inTheme.SystemThemes
Find Out More
Step-by-step for AG Grid — AG Grid Themes. Variable reference — Customising AdapTable Themes.
- Custom CSS variables on AdapTable
lightanddark light-redanddark-redmodes onthemeQuartzingridOptionsSystemThemespairs each AdapTable theme with its grid mode viaAgThemeMode
- Use the Theme toolbar or status panel to switch light and dark — AdapTable and AG Grid update together
- Open Settings Panel to see themed panels and wizards
FAQ
If I change the theme, will that get saved? Yes — the last selected theme is stored in user settings and restored on the next load.
Which system themes ship?
light, dark, and os. Branding is CSS overrides on light and dark, not separate theme files in State.
Can grid chrome match my AdapTable brand?
Yes — override AdapTable variables, then set matching AG Grid theme modes on SystemThemes with SystemThemeOptions.AgThemeMode — see Co-ordinated themes and AG Grid Themes.
What is the fastest way to design overrides? DevTools — Theme Builder on a live Grid, then export CSS into your app.
Do shipped themes sync with AG Grid automatically?
Yes for built-in AG Grid themes (Quartz, Alpine, Balham, Material). Custom grid themes need explicit AgThemeMode pairing.