# provideDashboardToolbarItems Type documentation

## TypeScript declaration

### [provideDashboardToolbarItems](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/configuration.ts#L43-L49>)

**Kind:** constant

```
import { provideDashboardToolbarItems } from '@siemens/dashboards-ng';
```

provider function to configure global toolbar menu items.

```
(toolbarItems?: { primary?: DashboardToolbarItem[] | undefined; secondary?: DashboardToolbarItem[] | undefined; } | undefined) => Provider = ...
```

```
provideDashboardToolbarItems(toolbarItems?: { primary?: DashboardToolbarItem[]; secondary?: DashboardToolbarItem[]; }): Provider
```

provider function to configure global toolbar menu items.

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [toolbarItems](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/configuration.ts#L43-L46>) (optional) | `{ primary?: DashboardToolbarItem[]; secondary?: DashboardToolbarItem[]; }` |  | • primary and secondary edit actions which are common to all dashboard instances on application. |

**Returns:** [Provider](<https://angular.dev/api/core/Provider>)

### Types Documentation

### [DashboardToolbarItem](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L42-L43>)

**Kind:** type alias

```
import type { DashboardToolbarItem } from '@siemens/dashboards-ng';
```

Union type for all possible items in the dashboard toolbar.

```
type DashboardToolbarItem = DashboardToolbarItemAction | DashboardToolbarItemRouterLink | DashboardToolbarItemLink
```

### [DashboardToolbarItemAction](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L11-L17>)

**Kind:** interface

```
import type { DashboardToolbarItemAction } from '@siemens/dashboards-ng';
```

Interface representing an action item in the dashboard toolbar.

```
interface DashboardToolbarItemAction
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [action](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L16-L16>) | `(grid: SiGridComponent) => void` | Action that called when the item is triggered. |
| [label](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L14-L14>) | `TranslatableString` | Label that is shown to the user. |
| [type](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L12-L12>) | `"action"` |  |

### [DashboardToolbarItemRouterLink](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L20-L28>)

**Kind:** interface

```
import type { DashboardToolbarItemRouterLink } from '@siemens/dashboards-ng';
```

Interface representing a router link item in the dashboard toolbar.

```
interface DashboardToolbarItemRouterLink
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [extras](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L27-L27>) (optional) | `NavigationExtras` | Navigation extras that are passed to the [RouterLink](<https://angular.dev/api/router/RouterLink>). |
| [label](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L23-L23>) | `TranslatableString` | Label that is shown to the user. |
| [routerLink](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L25-L25>) | `string \| any[]` | Link for the angular router. Accepts the same values as [RouterLink](<https://angular.dev/api/router/RouterLink>). |
| [type](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L21-L21>) | `"router-link"` |  |

### [DashboardToolbarItemLink](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L31-L39>)

**Kind:** interface

```
import type { DashboardToolbarItemLink } from '@siemens/dashboards-ng';
```

Interface representing a link item in the dashboard toolbar.

```
interface DashboardToolbarItemLink
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [href](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L36-L36>) | `string` | The href property of the anchor. |
| [label](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L34-L34>) | `TranslatableString` | Label that is shown to the user. |
| [target](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L38-L38>) (optional) | `string` | The target property of the anchor. |
| [type](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-dashboard-toolbar.model.ts#L32-L32>) | `"link"` |  |

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```
