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
Fork
  • This demo contains a Custom Theme called HighContrast which includes a number of changes both to AdapTable and AG Grid including:

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
Developer Guide

Defining a Custom Theme

Deep Dive

Anatomy of the Dark Theme