AG Grid theme

AG Grid theme is a package that adds Salt theme styles to AG Grid. The package contains CSS files only, and works with AG Grid versions 25-28.

When you want to use the Salt theme with AG Grid.

When you want to use a component that is not related to AG Grid. Instead, use Grid.

Make sure to install the necessary AG Grid packages. You will need to install ag-grid-react@28. You should also install any packages and modules that are necessary for your project, such as ag-grid-community and ag-grid-enterprise.

To install the @salt-ds/ag-grid-theme package, run the command appropriate to your environment:

To import the Salt AG Grid theme, use:

Then wrap your AG Grid with the corresponding class names shown below:

For light mode, use these CSS class names for each density:

For dark mode, use these CSS class names for each density:

For variants, use these CSS class names:

For editable fields, add the class name .editable-cell to the cellClass array in your column definition.

For fields displaying numeric values, add the class name .numeric-cell to the cellClass array in your column definition.