Theming AdapTable UI

View as Markdown

Summary

Find Out More

For how AdapTable UI is built — Base UI, shadcn, Tailwind (twa:), and accessibility — see AdapTable UI Components.

Topics on this Page

TopicSummary
Designing with DevToolsTheme Builder → export CSS
System themeslight, dark, os, index.css
Selecting a themeRuntime UI and persistence
CustomisingHandbook + variable overrides
CSS layers@layer adaptable in host apps
Co-ordinated themesAdapTable + 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.

ThemeBehaviour
lightDefault — no CurrentTheme required in Initial Adaptable State
darkDark tokens; when selected, AdapTable applies a matching dark AG Grid theme mode for built-in grid themes
osFollows 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"
},
1
Set Current Theme

Set dark as CurrentTheme in the Theme section of Initial Adaptable State

OS theme

OS Theme
Fork
  • In this demo the os System Theme is selected by default
  • AdapTable shows dark or light based on your operating system theme
Try It Out
  • Switch the operating system theme on your computer and note how AdapTable (and AG Grid) follow.
Loading demo…

Selecting a theme

Users can change theme at run time (subject to Entitlements) via:

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:

  1. CSS variable overrides on shipped light / dark (Theme Builder or hand-written CSS)
  2. Custom AG Grid theme modes with AgThemeMode on each entry in Theme.SystemThemes

Find Out More

Step-by-step for AG Grid — AG Grid Themes. Variable reference — Customising AdapTable Themes.

Co-ordinated Themes
Fork
  • Custom CSS variables on AdapTable light and dark
  • light-red and dark-red modes on themeQuartz in gridOptions
  • SystemThemes pairs each AdapTable theme with its grid mode via AgThemeMode
Try It Out
  • 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
Loading demo…

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.