Providing Custom Themes
Summary
- Users can create custom themes to complement the Shipped Themes provided by AdapTable
- Custom Themes primarily consist of sets of CSS Variables
- These build on the base Theme provided by AdapTable
- Typically you will want to override just a few of these values (primarily colours or spacing) to create a new Theme
If neither of the System Themes are to your liking it is easy write a Custom Theme.
Hint
If you only need to customize the appearance of the standard AdapTable themes (Light and Dark), you can achieve this by overriding the CSS variables in your own CSS file, without creating a new custom theme.
Custom Theme
- This demo contains a Custom Theme called
HighContrastwhich includes a number of changes both to AdapTable and AG Grid including:- Dashboard background
- Settings Panel background and Navigation colours
- Date Picker colours
- AG Grid row and header colours
Expand to see the Custom Theme that was provided
Find Out More
Technical Reference provides a a full list of CSS Variables in AdapTable
Defining Custom Themes
Note
- When AdapTable applies a theme, it sets the
ab--theme-<THEME_NAME>css className on document HTML element - This means that only one theme can be applied at any given time