It is possible to customise AG Grid Theme by using CSS variables and change them dynamically.
Source Code (stackblitz): https://stackblitz.com/edit/ag-grid-dynamic-theme-styling-by-updating-css-variables?file=src/App.scss
docs for themes customising: https://www.ag-grid.com/javascript-data-grid/themes-customising/
How it works
In App.scss root there are custom variables.
The custom variables are assigned to corresponding ag-grid CSS variable theme parameters.
There is a function that updates the custom variables.
Simplified example
Source Code (stackblitz): https://stackblitz.com/edit/dynamic-theme-styling-by-updating-css-variables-simple-example?file=src%2FApp.scss
Comments
0 comments
Please sign in to leave a comment.