---
title: "Theming: Customising Tool Panels"
framework: javascript
version: "36.1.0"
---

# Theming: Customising Tool Panels

Style the Filters [Tool Panel](https://www.ag-grid.com/javascript-data-grid/component-tool-panel/) and [Columns Tool Panel](https://www.ag-grid.com/javascript-data-grid/tool-panel-columns/).

## Styling the Sidebar Area

The sidebar is a tabbed container for opening and switching between tool panels. The grid exposes many theme parameters for customising the sidebar and tabbed buttons. For the full list, see the [Sidebar section](https://www.ag-grid.com/javascript-data-grid/theming-api/#reference-sidebar) of the parameters reference.

```js
const myTheme = themeQuartz.withParams({
    sideBarBackgroundColor: '#08f3',
    sideButtonBarBackgroundColor: '#fff6',
    sideButtonBarTopPadding: 20,
    sideButtonSelectedUnderlineColor: 'orange',
    sideButtonTextColor: '#0009',
    sideButtonHoverBackgroundColor: '#fffa',
    sideButtonSelectedBackgroundColor: '#08f1',
    sideButtonHoverTextColor: '#000c',
    sideButtonSelectedTextColor: '#000e',
    sideButtonSelectedBorder: false,
});
```

To create effects beyond what is possible with theme parameters, use CSS selectors:

```css
.ag-side-button.ag-selected {
    text-shadow: 0 0 8px #039;
    font-weight: 500;
}
```

#### Tool Panel Area Styling

```ts
import {
  ColDef,
  GridApi,
  GridOptions,
  ModuleRegistry,
  createGrid,
  enableDevValidations,
  themeQuartz,
} from "ag-grid-community";
import { AllEnterpriseModule } from "ag-grid-enterprise";
import { IOlympicData } from "./interfaces";

// Enable extended validations only for development
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([AllEnterpriseModule]);

const myTheme = themeQuartz.withParams({
  sideBarBackgroundColor: "#08f3",
  sideButtonBarBackgroundColor: "#fff6",
  sideButtonBarTopPadding: 20,
  sideButtonSelectedUnderlineColor: "orange",
  sideButtonTextColor: "#0009",
  sideButtonHoverBackgroundColor: "#fffa",
  sideButtonSelectedBackgroundColor: "#08f1",
  sideButtonHoverTextColor: "#000c",
  sideButtonSelectedTextColor: "#000e",
  sideButtonSelectedBorder: false,
});

const columnDefs: ColDef[] = [
  { field: "athlete", minWidth: 170, enableRowGroup: true, enablePivot: true },
  { field: "age", enableRowGroup: true, enablePivot: true },
  { field: "country", enableRowGroup: true, enablePivot: true },
  { field: "year", enableRowGroup: true, enablePivot: true },
  { field: "date" },
  { field: "sport", enableRowGroup: true, enablePivot: true },
  { field: "gold", enableValue: true },
  { field: "silver", enableValue: true },
  { field: "bronze", enableValue: true },
  { field: "total", enableValue: true },
];

let gridApi: GridApi<IOlympicData>;

const gridOptions: GridOptions<IOlympicData> = {
  theme: myTheme,
  columnDefs: columnDefs,
  defaultColDef: {
    editable: true,
    filter: true,
  },
  sideBar: true,
};

const gridDiv = document.querySelector<HTMLElement>("#myGrid")!;
gridApi = createGrid(gridDiv, gridOptions);

fetch("https://www.ag-grid.com/example-assets/olympic-winners.json")
  .then((response) => response.json())
  .then((data: IOlympicData[]) => gridApi!.setGridOption("rowData", data));
```

[Live example: Tool Panel Area Styling](https://www.ag-grid.com/examples/theming-tool-panels/tool-panel-tabs/typescript)

## Styling the Columns Tool Panel

The `--ag-column-select-indent-size` CSS Variable sets the indent of each column group within the columns tool panel. For further customisation, use CSS selectors.

This example demonstrates changing the child indent for grouped columns and the style of the column drop component in the Row Groups area:

```js
const myTheme = themeQuartz.withParams({
    columnSelectIndentSize: 40,
    columnDropCellBackgroundColor: 'purple',
    columnDropCellTextColor: 'white',
    columnDropCellDragHandleColor: 'white',
    columnDropCellBorder: { color: 'yellow', style: 'dashed', width: 2 },
});
```

```css
.ag-column-drop-cell {
    box-shadow: 0 0 4px purple;
}
/* The different sections within the columns tool panel use
   flex sizing to adapt to vertical space, use min-height
   and max-height to constrain their heights */
.ag-column-drop-vertical-rowgroup {
    min-height: 120px;
}
.ag-column-drop-vertical-aggregation {
    min-height: 90px;
}
```

#### Columns Tool Panel

```ts
import {
  GridApi,
  GridOptions,
  ModuleRegistry,
  createGrid,
  enableDevValidations,
  themeQuartz,
} from "ag-grid-community";
import { AllEnterpriseModule } from "ag-grid-enterprise";
import { IOlympicData } from "./interfaces";

// Enable extended validations only for development
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([AllEnterpriseModule]);

let gridApi: GridApi<IOlympicData>;

const myTheme = themeQuartz.withParams({
  columnSelectIndentSize: 40,
  columnDropCellBackgroundColor: "purple",
  columnDropCellTextColor: "white",
  columnDropCellDragHandleColor: "white",
  columnDropCellBorder: { color: "yellow", style: "dashed", width: 2 },
});

const gridOptions: GridOptions<IOlympicData> = {
  theme: myTheme,
  columnDefs: [
    {
      headerName: "Athlete",
      children: [
        {
          field: "athlete",
          minWidth: 170,
          rowGroup: true,
          enableRowGroup: true,
          enablePivot: true,
        },
        {
          field: "age",
          rowGroup: true,
          enableRowGroup: true,
          enablePivot: true,
        },
        { field: "country", enableRowGroup: true, enablePivot: true },
      ],
    },
    {
      headerName: "Event",
      children: [
        { field: "year", enableRowGroup: true, enablePivot: true },
        { field: "date" },
        { field: "sport", enableRowGroup: true, enablePivot: true },
      ],
    },
    {
      headerName: "Medals",
      children: [
        { field: "gold", enableValue: true },
        { field: "silver", enableValue: true },
        { field: "bronze", enableValue: true },
        { field: "total", enableValue: true },
      ],
    },
  ],
  defaultColDef: {
    editable: true,
    filter: true,
  },
  sideBar: "columns",
};

const gridDiv = document.querySelector<HTMLElement>("#myGrid")!;
gridApi = createGrid(gridDiv, gridOptions);

fetch("https://www.ag-grid.com/example-assets/olympic-winners.json")
  .then((response) => response.json())
  .then((data: IOlympicData[]) => gridApi!.setGridOption("rowData", data));
```

[Live example: Columns Tool Panel](https://www.ag-grid.com/examples/theming-tool-panels/column-tool-panel/typescript)
