# Tabs and Toolbars

Canonical page: https://www.adaptabletools.com/docs/ui-dashboard-tabs-toolbars

- Most of the content in the AdapTable Dashboard is provided via Toolbars
- AdapTable ships with many Module Toolbars - which provide easy access to the functionality in that Module
- Additionally developers can supply their own Custom Toolbars
- Toolbars can either be _grouped_ into Tabs or _pinned_ above the Grid

The most commonly used element in the Dashboard is a series of **Toolbars**.

Toolbars contain small UI controls and can be of 2 types:

- Adaptable-provided **Module** Toolbars
- User-provided **Custom** Toolbars

Toolbars can be rendered in 2 ways:

- Grouped together inside **Tabs**
- **Pinned** above the Grid

- These 2 ways of showing Toolbars are not mutually exclusive
- Tabs and Pinned Toolbars can be displayed simultaneously allowing for a fully flexible arrangement

## Tabs

Toolbars are most typically grouped into named **Tabs** for ease of use.

This allows users to place multiple similar toolbars into one common place.

Users can click the Header name in each Tab to open or close it as required

**Example: Dashboard: Tabs & Toolbars**

Providing Tabs and Module Toolbars in the Dashboard

- This demo illustrates 3 Dashboard Tabs:
  - `Search` - containing `Grid Filter`, `Data Set` and `Quick Search` Toolbars
  - `Edit` - containing `Smart Edit`, `Bulk Update` and `Data Changes` Toolbars
  - `Notifications` - containing `Alert`, and `System Status` Toolbars

- Click on a Tab to switch to a new set of Toolbars

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Dashboard Toolbars',
  initialState: {
    Dashboard: {
      Tabs: [
        {
          Name: 'Search',
          Toolbars: ['GridFilter', 'DataSet', 'QuickSearch'],
        },
        {
          Name: 'Edit',
          Toolbars: ['SmartEdit', 'BulkUpdate', 'DataChangeHistory'],
        },
        {
          Name: 'Notifications',
          Toolbars: ['Alert', 'SystemStatus'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'license',
            'has_projects',
            'has_pages',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'week_issue_change',
          ],
          Name: 'Standard Layout',
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

Since [Version 11](https://www.adaptabletools.com/support/version-11-release-note), AdapTable no longer creates a default Tab if none is provided in Initial Adaptable State

## Pinned Toolbars

Another option is to place Toolbars directly above the Grid - this is known as Pinned Toolbars.

- This is most typically used for the [Grid Filter](https://www.adaptabletools.com/docs/handbook-grid-filter/index.md) Toolbar which is often placed directly above the Grid
- In this way, it acts as a full Row filter to complement Column Filters

**Example: Dashboard: Pinned Toolbars**

Using Pinned Toolbars

- This example contains 2 Pinned Toolbars - `Grid Filter` and `Export`

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Pinned Toolbars',
  initialState: {
    Dashboard: {
      PinnedToolbars: ['GridFilter', 'Export'],
    },
    Theme: {CurrentTheme: 'dark'},
    Export: {
      CurrentFormat: 'Excel',
      CurrentReport: 'All Data',
    },
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          Name: 'Standard Layout',
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'github_watchers',
            'license',
            'pushed_at',
            'updated_at',
            'has_wiki',
            'created_at',
            'description',
            'open_issues_count',
            'topics',
          ],
          GridFilter: {
            Expression: '[github_watchers] > 2000',
          },
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

- Pinned Toolbars do not contain the name of the Module
- They cannot be removed directly via a close button (but this can be done in the Dashboard Settings Panel)

## Module Toolbars

Module Toolbars are essentially collections of controls which provide quick, easy access to a single Module (e.g. the [Export](https://www.adaptabletools.com/docs/handbook-exporting/index.md) Toolbar contains a dropdown showing all Reports together with add / edit / delete buttons).

Each Module Toolbar has these elements:

- UI Controls relevant to that Module
- Name of the Module
- A _configure_ button which opens the Module's Page in the Settings Panel
- A _close_ button which removes the Toolbar from the Tab (disabled if Dashboard [Entitlement](https://www.adaptabletools.com/docs/handbook-permissioning/index.md) is `ReadOnly`)

AdapTable currently provides these Module Toolbars:

- [Alerts](https://www.adaptabletools.com/docs/handbook-alerting/index.md)
- [Bulk Update](https://www.adaptabletools.com/docs/handbook-editing-bulk-update/index.md)
- [Cell Summary](https://www.adaptabletools.com/docs/handbook-summarising/index.md)
- [Change History](https://www.adaptabletools.com/docs/handbook-monitoring-data-change-history/index.md)
- [Charts](https://www.adaptabletools.com/docs/handbook-charts/index.md)
- [Data Set](https://www.adaptabletools.com/docs/handbook-data-sets/index.md)
- [Export](https://www.adaptabletools.com/docs/handbook-exporting/index.md)
- [Column Filters](https://www.adaptabletools.com/docs/handbook-column-filter/index.md)
- [Grid Filter](https://www.adaptabletools.com/docs/handbook-grid-filter/index.md)
- [Layout](https://www.adaptabletools.com/docs/handbook-layouts/index.md)
- [Quick Search](https://www.adaptabletools.com/docs/handbook-quick-search/index.md)
- [Smart Edit](https://www.adaptabletools.com/docs/handbook-editing-smart-edit/index.md)
- [State Management](https://www.adaptabletools.com/docs/dev-guide-adaptable-state-management/index.md)
- [System Status Messages](https://www.adaptabletools.com/docs/handbook-system-status-message/index.md)
- [Theme](https://www.adaptabletools.com/docs/handbook-theming/index.md)

Additionally these Module Toolbars are available if the appropriate plugin is loaded:

- [OpenFin](https://www.adaptabletools.com/docs/integrations-openfin/index.md)
- [ipushpull](https://www.adaptabletools.com/docs/integrations-ipushpull/index.md)

## Custom Toolbars

Developers can supplement the Module Toolbars with their own Custom Toolbars.

These can contain either a set of AdapTable Buttons or full custom content.

See [Custom Toolbars](https://www.adaptabletools.com/docs/ui-dashboard-custom-toolbars/index.md) for full information on providing bespoke content in the Dashboard

## Configuring Tabs and Toolbars

Developers can define which Tabs and Toolbars should be displayed in Initial Adaptable State.

This can include Custom Toolbars which are referenced in Initial State but defined in Dashboard Options.
