# SiWidgetStorage Type documentation

## TypeScript declaration

### [SiWidgetStorage](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L29-L69>)

**Kind:** class

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

Widget storage api to provide the persistence layer of the widgets of a dashboard (typically from a web service). The dashboard grid uses this API to load and save the widget configurations. Applications using siemens-dashboard needs to implement this abstract class and provide it in the module configuration.

```
undecorated_class SiWidgetStorage
```

#### Constructor

##### constructor

[Source for constructor](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L29-L69>)

```
constructor(): SiWidgetStorage
```

**Returns:** [SiWidgetStorage](<index.html#t:SiWidgetStorage>)

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [getToolbarMenuItems](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L65-L68>) (optional, deprecated) | `((dashboardId?: string) => { primary: Observable<(MenuItem \| DashboardToolbarItem)[]>; secondary: Observable<(MenuItem \| DashboardToolbarItem)[]>; })` | Optional method to provide primary and secondary toolbar menu items.<br><br>Deprecated: use [provideDashboardToolbarItems](<../provideDashboardToolbarItems/index.html#t:provideDashboardToolbarItems>) to provide common toolbar items. Additionally configure individual dashboard actions via [SiFlexibleDashboardComponent.primaryEditActions](<../../components/SiFlexibleDashboardComponent/index.html#SiFlexibleDashboardComponent.primaryEditActions>) and [SiFlexibleDashboardComponent.secondaryEditActions](<../../components/SiFlexibleDashboardComponent/index.html#SiFlexibleDashboardComponent.secondaryEditActions>) respectively. |

#### Methods

##### load

[Source for load](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L34-L34>)

Returns an observable with the dashboard widget configuration. The dashboard subscribes to the observable and updates when a new value emits.

```
load(dashboardId?: string): Observable<WidgetConfig[]>
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [dashboardId](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L34-L34>) (optional) | `string` |  |  |

**Returns:** [Observable](<https://rxjs.dev/api/index/class/Observable>)`<`[WidgetConfig](<index.html#t:WidgetConfig>)`[]>`

##### save

[Source for save](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L51-L56>)

Saves the given widget configuration. New widgets have `id` generated through the `SiWidgetIdProvider.generateWidgetId` implementation and if ids comes from backend then it is in the responsibility of the implementor to update the ids of the new widgets with the ids returned from backend upon save. In addition, the implementor needs to check if objects that have been available before are missing. These widgets have been removed by the user. As a result of this method, the observables returned by the `load()` method should emit the new widget config objects, before also returning them.

Returns: An observable that emits the saved widget config objects with their ids.

```
save(modifiedWidgets: WidgetConfig[], addedWidgets: WidgetConfig[], removedWidgets?: WidgetConfig[], dashboardId?: string): Observable<WidgetConfig[]>
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [modifiedWidgets](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L52-L52>) | `WidgetConfig[]` |  | • The existing widget config objects to be saved. |
| [addedWidgets](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L53-L53>) | `WidgetConfig[]` |  | • The new widget config objects to be saved. |
| [removedWidgets](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L54-L54>) (optional) | `WidgetConfig[]` |  | • The widget config objects that have been removed. |
| [dashboardId](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts#L55-L55>) (optional) | `string` |  | • The id of the dashboard if present to allow dashboard specific storage. |

**Returns:** [Observable](<https://rxjs.dev/api/index/class/Observable>)`<`[WidgetConfig](<index.html#t:WidgetConfig>)`[]>`

### 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
```

### [MenuItem](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L19-L85>)

**Kind:** interface

```
import type { MenuItem } from '@siemens/element-ng/common';
```

The MenuItem is used to configure clickable items in menus. They support a name, link, icons and sub-menu items.

Deprecated: This interface should no longer be used. Use a corresponding alternative based on your use case:

• for [SiMenuFactoryComponent](<../../../element-ng/components/SiMenuFactoryComponent/index.html#SiMenuFactoryComponent>) use [@siemens/element-ng/menu\#MenuItem](<../../../element-ng/types/_entrypoints/menu/MenuItem/index.html#t:MenuItem>)

• for [SiContentActionBarComponent](<../../../element-ng/components/SiContentActionBarComponent/index.html#SiContentActionBarComponent>) use [@siemens/element-ng/menu\#MenuItem](<../../../element-ng/types/_entrypoints/menu/MenuItem/index.html#t:MenuItem>) and [ContentActionBarMainItem](<../../../element-ng/types/ContentActionBarMainItem/index.html#t:ContentActionBarMainItem>)

• for [SiNavbarVerticalComponent](<../../../element-ng/components/SiNavbarVerticalComponent/index.html#SiNavbarVerticalComponent>) use [NavbarVerticalItem](<../../../element-ng/types/NavbarVerticalItem/index.html#t:NavbarVerticalItem>)

• for [@siemens/dashboards-ng\#SiFlexibleDashboardComponent](<../../components/SiFlexibleDashboardComponent/index.html#SiFlexibleDashboardComponent>) use [@siemens/dashboards-ng\#DashboardToolbarItem](<index.html#t:DashboardToolbarItem>)

```
interface MenuItem extends Link
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [action](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L42-L42>) (optional, inherited) | `string \| ((param?: any) => void \| any)` | A function that will be invoked when clicking on the menu item. When passed as a string, use together with SiLinkActionService to receive events. This is meant for repetitive things in lists/tables/etc.<br><br>Inherited from [Link](<index.html#t:Link>) |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L56-L56>) (optional) | `string \| number` | Defines the content of the optional badge. Should be a number or something like "100+". if undefined or empty string, no badge is displayed |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L60-L60>) (optional) | `string` | Defines the background color of the badge. Default is specific to Element flavour. |
| [badgeDot](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L68-L68>) (optional) | `boolean` | Show a dot badge without content? |
| [badgeStyle](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L64-L64>) (optional) | `"" \| "inline" \| "dot"` | Defines the badge style |
| [customContent](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L51-L51>) (optional) | `boolean` | Defines if custom content is chosen in account dropdown (otherwise accountItems are used) |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L50-L50>) (optional, inherited) | `boolean` | A boolean that lets the link know whether it is disabled or not.<br><br>Inherited from [Link](<index.html#t:Link>) |
| [dropUpwards](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L84-L84>) (optional) | `boolean` | Whether the menu items sub-menu should open upwards instead of downwards. |
| [expanded](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L42-L42>) (optional) | `boolean` | If the menu item has children you can specify if they are visible or not. |
| [href](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L22-L22>) (optional, inherited) | `string` | Defines a href URI that the menu item will be linked to. Will be used to set the href attribute of the a element. Will only be used if link and function is not set.<br><br>Inherited from [Link](<index.html#t:Link>) |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L27-L27>) (optional) | `string` | The web font icon class name (e.g. element-settings-outline). |
| [iconOnly](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L46-L46>) (optional) | `boolean` | Defines if only the icon is shown in the default navigation bar. |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L23-L23>) (optional) | `string` | An optional id to uniquely identify the menu item. |
| [image](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L32-L32>) (optional) | `string` | The value for an image src tag. Maybe a relative or absolute link to an jpg or gif image. |
| [isActive](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L46-L46>) (optional, inherited) | `boolean` | A boolean that lets the link know whether it is active or not. It is useful when action() is executed instead of link route.<br><br>Inherited from [Link](<index.html#t:Link>) |
| [isHeading](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L80-L80>) (optional) | `boolean` | Whether the menu item should be displayed as a heading/title, will also disable links and actions. |
| [items](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L37-L37>) (optional) | `MenuItem[]` | A navigation bar item can have a sub-menu, if these items are set. They define the sub-menu content. |
| [link](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L32-L32>) (optional, inherited) | `string \| any[]` | Defines the link of the menu item within the application using the angular router link concept. Accepts an array of `any` as per \[routerLink API definition\][https://angular.dev/api/router/RouterLink](<https://angular.dev/api/router/RouterLink>).<br><br>Inherited from [Link](<index.html#t:Link>) |
| [navigationExtras](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L36-L36>) (optional, inherited) | `NavigationExtras` | The navigation extras provide additional routing options when using the router link.<br><br>Inherited from [Link](<index.html#t:Link>) |
| [selectionState](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L72-L72>) (optional) | `"" \| "check" \| "radio"` | For single/multi choice items: the kind of icon to show. |
| [target](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L27-L27>) (optional, inherited) | `string` | The target attribute specifies where to open the linked document. If no target is specified, the link will open in the current tab.<br><br>Inherited from [Link](<index.html#t:Link>) |
| [title](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L12-L12>) (optional, inherited) | `TranslatableString` | The title of the menu item. Can be either the title to be displayed or the translation key.<br><br>Inherited from [Link](<index.html#t:Link>) |
| [tooltip](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L17-L17>) (optional, inherited) | `TranslatableString` | The optional tooltip of the link. Can be either the text to be displayed or the translation key.<br><br>Inherited from [Link](<index.html#t:Link>) |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/menu.model.ts#L76-L76>) (optional) | `"check" \| "radio"` | Type to distinguish between check and radio menu items. Needs to be set for correct interaction and used for a11y. |

### [WidgetConfig](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L146-L211>)

**Kind:** interface

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

A [WidgetConfig](<index.html#t:WidgetConfig>) holds the configuration of a widget instance component that is visible on a dashboard. It can be persisted and used to restore a dashboards state.

```
interface WidgetConfig
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [accentLine](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L210-L210>) (optional) | `AccentLineType` | Optional type of the accent line. |
| [actionBarViewType](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L200-L200>) (optional) | `ViewType` |  |
| [expandable](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L189-L189>) (optional) | `boolean` | Defines whether the widget instance component can be expanded and enlarged over the dashboard. |
| [heading](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L185-L185>) (optional) | `TranslatableString` | grid item header text. |
| [headingIcon](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L187-L187>) (optional) | `string \| Record<string, string>` | Icon name or a single-entry map of camelCase icon name to SVG data URI. |
| [height](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L165-L165>) (optional) | `number` | Height of the grid item, where number represents how many rows it takes. (default?: 1) |
| [id](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L148-L148>) | `string` | A unique id of a widget instance |
| [image](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L206-L206>) (optional) | `WidgetImage` | Optional configuration for an image to be displayed on the widget instance. |
| [immutable](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L202-L202>) (optional) | `boolean` |  |
| [isNotRemovable](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L201-L201>) (optional) | `boolean` |  |
| [minHeight](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L181-L181>) (optional) | `number` | minimum height allowed during resize/creation (default?: undefined = un-constrained) |
| [minWidth](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L177-L177>) (optional) | `number` | minimum width allowed during resize/creation (default?: undefined = un-constrained) |
| [payload](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L191-L191>) (optional) | `any` | A widget specific payload object. Placeholder to pass in additional configuration. |
| [setupPending](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L199-L199>) (optional) | `boolean` | If true, the widget host renders a placeholder and waits for explicit configuration before instantiating the widget instance component.<br><br>Indicates that initial setup by the user is still pending. The flag flips to `false` once the setup has been completed. |
| [version](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L157-L157>) (optional) | `string` | Optionally, the version widget description that was used to create the widget config. |
| [widgetId](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L153-L153>) | `string` | The id of the widget descriptor that was used to instantiate the `WidgetConfig` and the widget instance component. |
| [width](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L161-L161>) (optional) | `number` | Width of the grid item, where number represents how many columns it spans (default?: 1) |
| [x](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L169-L169>) (optional) | `number` | Grid item position on x axis of the grid (default?: 0) |
| [y](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L173-L173>) (optional) | `number` | Grid item position on y axis of the grid (default?: 0) |

### [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
```

### [Link](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L8-L51>)

**Kind:** interface

```
import type { Link } from '@siemens/element-ng/link';
```

```
interface Link
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [action](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L42-L42>) (optional) | `string \| ((param?: any) => void \| any)` | A function that will be invoked when clicking on the menu item. When passed as a string, use together with SiLinkActionService to receive events. This is meant for repetitive things in lists/tables/etc. |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L50-L50>) (optional) | `boolean` | A boolean that lets the link know whether it is disabled or not. |
| [href](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L22-L22>) (optional) | `string` | Defines a href URI that the menu item will be linked to. Will be used to set the href attribute of the a element. Will only be used if link and function is not set. |
| [isActive](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L46-L46>) (optional) | `boolean` | A boolean that lets the link know whether it is active or not. It is useful when action() is executed instead of link route. |
| [link](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L32-L32>) (optional) | `string \| any[]` | Defines the link of the menu item within the application using the angular router link concept. Accepts an array of `any` as per \[routerLink API definition\][https://angular.dev/api/router/RouterLink](<https://angular.dev/api/router/RouterLink>). |
| [navigationExtras](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L36-L36>) (optional) | `NavigationExtras` | The navigation extras provide additional routing options when using the router link. |
| [target](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L27-L27>) (optional) | `string` | The target attribute specifies where to open the linked document. If no target is specified, the link will open in the current tab. |
| [title](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L12-L12>) (optional) | `TranslatableString` | The title of the menu item. Can be either the title to be displayed or the translation key. |
| [tooltip](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L17-L17>) (optional) | `TranslatableString` | The optional tooltip of the link. Can be either the text to be displayed or the translation key. |

### [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"` |  |

### [ViewType](<https://github.com/siemens/element/blob/main/projects/element-ng/content-action-bar/si-content-action-bar.model.ts#L13-L13>)

**Kind:** type alias

```
import type { ViewType } from '@siemens/element-ng/content-action-bar';
```

```
type ViewType = 'collapsible' | 'expanded' | 'mobile'
```

### [WidgetImage](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L118-L140>)

**Kind:** interface

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

Image is used to configure an image to be displayed on a widget instance.

```
interface WidgetImage
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [alt](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L127-L127>) | `string` | The HTMLImageElement property [alt](<https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#usage_notes>) provides fallback (alternate) text to display when the image specified by the \<img\> element is not loaded. |
| [dir](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L131-L131>) (optional) | `"horizontal" \| "vertical"` | Defines if an image is placed on top or start (left) of the card. |
| [objectFit](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L135-L135>) (optional) | `ObjectFit` | Sets the image [object-fit](<https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit>) CSS property. |
| [objectPosition](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L139-L139>) (optional) | `string` | Sets the image [object-position](<https://developer.mozilla.org/en-US/docs/Web/CSS/object-position>) CSS property. |
| [src](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L122-L122>) | `string` | The image URL (See [\<img\>](<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src>)). |

### [AccentLineType](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/status-type.model.ts#L10-L10>)

**Kind:** type alias

```
import type { AccentLineType } from '@siemens/element-ng/common';
```

```
type AccentLineType = StatusType | 'caution' | 'primary' | 'inactive'
```

### [ObjectFit](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L113-L113>)

**Kind:** type alias

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

ObjectFit configuration options for a widget image.

See: [https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit](<https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit>)

```
type ObjectFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'
```

### [StatusType](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/status-type.model.ts#L7-L7>)

**Kind:** type alias

```
import type { StatusType } from '@siemens/element-ng/common';
```

```
type StatusType = 'success' | 'info' | 'warning' | 'danger' | 'caution' | 'critical'
```
