Flexible dashboard¶
Flexible dashboards are an extension of static dashboards that allow users to customize the content according to their specific needs.
Usage¶
Flexible dashboards offers a personalized experience by enabling users to tailor the dashboards content itself.
Users can enter the edit mode to add, move and remove widgets, as well as restoring the dashboard to its default settings.

When to use¶
- Use it when there is a large amount of widgets that users can choose from.
- Use it if the application is used by a diverse group of users with different needs and goals.
- Use it if users may need to prioritize certain types of information over others based on their current tasks or goals.
- Be mindful about its use. Providing too many customization options can overwhelm users and make the dashboard more difficult to use.
Design¶
Default mode¶
In default mode, the dashboard displays a pre-defined set of widgets, providing users with a view of the data and insights based on their chosen configuration.

- Title (optional), 2. Dashboard options (optional), 3. Content area 4. Edit mode button
The dashboard options area on top of the widgets can be used for actions such as filtering, which affect the whole dashboard.
Edit mode¶
In edit mode, users can customize the dashboard to fit their specific needs. The dashboard options area is replaced by editing options that allow users to add widgets and perform other actions.

- Title (optional), 2. Editing options (optional), 3. Content area, 4. Save and cancel button
Add widget¶
- Select
Add widgetto open the widget library. - Select the desired widget.
- Click
Add. The library will be closed and the new widget will be added at the bottom of the page.

Resize¶
Users can use the resize handler at the bottom right corner and drag horizontally to change the width, vertically to change the height, or diagonally to change both dimensions. A light blue box appears to indicate the area a widget will snap to, once the user releases the resize handle.

Move¶
Users can select a widget within the content area and drag it to the desired location. As with resizing, a light blue box appears to indicate where the widget will be positioned upon letting it go.

Code¶
The flexible dashboards are based on gridstack.js.
See README for details about including to your app.
Direct Link to dashboard demo.
import { SiFlexibleDashboardComponent } from '@siemens/dashboards-ng';The component implements a dashboard with adding, removing and resizing widgets. It consists and connects a toolbar, a grid with widgets, and a widget catalog.
Project si-inline-notification elements directly into this component to display dashboard-level notifications below the toolbar and above the widget grid in the dashboard view. Other element types are not accepted.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| config ¶ | Config | undefined | inject(SI_DASHBOARD_CONFIGURATION) | Option to configure a dashboard instance. Default is the optional value from the SI_DASHBOARD_CONFIGURATION. |
| dashboardId ¶ | string | undefined | Optionally, but it is recommended to include an id for a dashboard. The id is utilized in the persistence calls on the SiWidgetStorage. | |
| editable ¶ | boolean | false | Input to change the dashboard editable state. |
| heading ¶ | string | undefined | Heading for the dashboard. To show a custom header instead, e.g. with a description or page actions, project it using the | |
| hideAddWidgetInstanceButton ¶ | boolean | false | Option to remove the add widget instance button from the primary toolbar. |
| hideEditButton ¶ | boolean | false | Option to hide the dashboard edit button. |
| hideProgressIndicator ¶ | boolean | false | Option to turn off the loading spinner on save and load operations. |
| multiSelect ¶ | boolean | false | Option to enable multi-select in the widget catalog. When enabled, the user can select multiple widgets to add to the dashboard at once. |
| primaryEditActions ¶ | DashboardToolbarItem[] | [] | Primary action menu items shown in the edit mode of the dashboard. |
| searchPlaceholder ¶ | TranslatableString | $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search…` | Placeholder text for the search input field in the widget catalog. |
| secondaryEditActions ¶ | DashboardToolbarItem[] | [] | Secondary action menu items shown in the edit mode of the dashboard. |
| showEditButtonLabel ¶ | boolean | false | Option to display the edit button as a text button instead, only if the window is larger than xs SiResponsiveContainerDirective. |
| widgetCatalog ¶ | Widget[] | [] | Sets the available widgets for the widget catalog to the dashboard. |
| widgetCatalogComponent ¶ | Type<SiWidgetCatalogComponent> | undefined | Optionally, provide a custom subclass of the SiWidgetCatalogComponent to use your own catalog component. | |
| widgetInstanceEditorDialogComponent ¶ | Type<SiWidgetInstanceEditorDialogComponent> | undefined | Optionally, provide a custom subclass of the SiWidgetInstanceEditorDialogComponent to use your own implementation. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| editableChange ¶ | boolean | Input to change the dashboard editable state. |
| isModified ¶ | boolean | Emits the modification state of the grid. It is |
import { SiGridComponent } from '@siemens/dashboards-ng';The grid component is the actual component on which the widget instances are placed and visualized. You can think of a headless dashboard, without a title, toolbar or edit buttons.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| dashboardId ¶ | string | undefined | An optional, but recommended dashboard id that is used in persistence and passed to the widget store for saving and loading data. | |
| editable ¶ | boolean | false | Sets the grid into editable mode, in which the widget instances can be moved, resized, removed or new ones added. |
| emitWidgetInstanceEditEvents ¶ | boolean | false | When the user clicks edit on a widget instance, an editor need to appear and the widget editor component need to be loaded. When the grid is used standalone, it takes care and opens a modal dialog and loads the configured widget editor component. When the grid is used in a container like the flexible dashboard, the container manages where the widget instance editor is displayed. In this case this options prevents the grid from showing the editor in the dialog, and emits on |
| gridConfig ¶ | GridConfig | undefined | inject(SI_DASHBOARD_CONFIGURATION)?.grid | Configuration options for a grid instance. Default is the optional value from the SI_DASHBOARD_CONFIGURATION. |
| hideProgressIndicator ¶ | boolean | false | Option to turn off the loading spinner on save and load operations. |
| widgetCatalog ¶ | Widget[] | [] | Provides the available widgets to the grid. When loading the widget configurations from the storage, we need to have the widget definition available to be able to create the widget instances on the grid. |
| widgetInstanceEditorDialogComponent ¶ | Type<SiWidgetInstanceEditorDialogComponent> | undefined | Option to configure a custom widget instance editor dialog component. The component provides the editor hosting and the buttons to save and cancel. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| editableChange ¶ | boolean | Sets the grid into editable mode, in which the widget instances can be moved, resized, removed or new ones added. |
| isModified ¶ | boolean | Emits the modification state of the grid. It is |
| widgetInstanceEdit ¶ | WidgetConfig | Emits to notify about edit events of widget instances. Only emits if |
Attributes and Methods¶
| Name | Type | Default | Description |
|---|---|---|---|
| addWidgetInstance() ¶ | (widgetInstanceConfig: Omit<WidgetConfig, "id">) => void | Adds a new widget instance configuration to the dashboard grid. It is not persisted yet and is added to the transient widget instances. Parameters
| |
| cancel() ¶ | () => void | Cancel current changes and restore last saved state. | |
| edit() ¶ | () => void | Set dashboard grid in editable mode to modify widget instances. | |
| editWidgetInstance() ¶ | (widgetInstanceConfig: WidgetConfig) => void | Opens the provided widget configuration in the related editor or emits on widgetInstanceEdit, if emitWidgetInstanceEditEvents is true. Parameters
| |
| (readonly) gridStackWrapper ¶ | Signal<SiGridstackWrapperComponent> | viewChild.required(SiGridstackWrapperComponent) | |
| (readonly) isLoading ¶ | BehaviorSubject<boolean> | new BehaviorSubject<boolean>(false) | Indication for load and save operations. |
| removeWidgetInstance() ¶ | Removes a widget instance from the visible widgets and puts it in the markedForRemoval array. Parameters
| ||
| save() ¶ | () => void | Persists the current widget instances to the widget storage and changes the editable and isModified modes. | |
| updateWidgetInstance() ¶ | (editedWidgetConfig: WidgetConfig) => void | Updates the visible widgets with an updated configuration. Will update the user interface and emit on isModified. Parameters
|
Custom header¶
Like the dashboard, the flexible dashboard supports a custom header, e.g. with a description or page actions. Project it using the header attribute and follow the page header guidelines. The custom header replaces the heading in the dashboard view. While adding or editing widgets, the respective title is shown instead.
<si-flexible-dashboard [dashboardId]="dashboardId" [widgetCatalog]="widgetCatalog">
<div class="si-layout-header" header>
<h2 class="si-layout-title si-layout-top-element">Dashboard</h2>
<p class="si-layout-subtitle">Description</p>
</div>
</si-flexible-dashboard>
Dashboard notifications¶
Project si-inline-notification elements directly into <si-flexible-dashboard>. Other elements are not accepted by this slot. Notifications are displayed below the dashboard toolbar and above the widget grid. They stay pinned with the dashboard header while the widget grid scrolls, and the region collapses completely when no notification is projected.
Use this region for important, persistent states that affect the entire dashboard or multiple widgets, such as outdated data or failed widget loading. Keep messages concise and avoid using the region for routine or transient widget updates.
<si-flexible-dashboard [dashboardId]="dashboardId" [widgetCatalog]="widgetCatalog">
<si-inline-notification
severity="warning"
heading="Some data is outdated"
message="The dashboard could not refresh all widgets."
/>
</si-flexible-dashboard>
Persistence of dashboard configuration¶
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.
-
() => SiWidgetStorage¶
-
Optional method to provide primary and secondary toolbar menu items.
Deprecated: use provideDashboardToolbarItems to provide common toolbar items. Additionally configure individual dashboard actions via SiFlexibleDashboardComponent.primaryEditActions and SiFlexibleDashboardComponent.secondaryEditActions respectively.
getToolbarMenuItems?:
deprecated((dashboardId?: string) => { primary: Observable<(MenuItem | DashboardToolbarItem)[]>; secondary: Observable<(MenuItem | DashboardToolbarItem)[]>; })¶
-
load
(dashboardId?: string) => Observable<WidgetConfig[]>¶Returns an observable with the dashboard widget configuration. The dashboard subscribes to the observable and updates when a new value emits.
Parameters -
save
(modifiedWidgets: WidgetConfig[], addedWidgets: WidgetConfig[], removedWidgets?: WidgetConfig[], dashboardId?: string) => Observable<WidgetConfig[]>¶Saves the given widget configuration. New widgets have
idgenerated through theSiWidgetIdProvider.generateWidgetIdimplementation 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 theload()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.
Parameters-
• The existing widget config objects to be saved.
-
• The new widget config objects to be saved.
-
• The widget config objects that have been removed.
-
• The id of the dashboard if present to allow dashboard specific storage.
-
import { SiWidgetCatalogComponent } from '@siemens/dashboards-ng';Default widget catalog implementation to show all available widgets that can be added to a dashboard. It consists of a list view, that lists all available widgets and after selection, a host in which the widget specific editor is loaded. Applications can either stay with the default catalog or implement their own by extending this class.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| multiSelect ¶ | boolean | false | Option to enable multi-select in the widget catalog. When enabled, the user can select multiple widgets to add to the dashboard at once. |
| searchPlaceholder ¶ | TranslatableString | $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search…` | Placeholder text for the search input field in the widget catalog. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| closed ¶ | Omit<WidgetConfig, "id">[] | undefined | Emits when the catalog is |
Attributes and Methods¶
| Name | Type | Default | Description |
|---|---|---|---|
| widgetCatalogdeprecated ¶ | Widget[] | [] | Property to provide the available widgets to the catalog. The flexible dashboard creates the catalog by Angular's Deprecated: This property will be removed in v52. Use the signal |
| (readonly) widgetList ¶ | WritableSignal<Widget[]> | [] | Property to provide the available widgets to the catalog. The flexible dashboard creates the catalog by Angular's |
import { SiWidgetInstanceEditorDialogComponent } from '@siemens/dashboards-ng';The Dialog component is utilized when editing a widget instance within a dashboard. It dynamically loads and creates the associated widget editor and incorporates it into its content. The dialog component is accountable for interacting with the dashboard and offers options for saving changes or terminating the editing process.
Input Properties¶
| Name | Type | Description |
|---|---|---|
| widgetrequired ¶ | Widget | Input for the widget definition. It is required to retrieve the component factory to instantiate the widget editor. |
| widgetConfigrequired ¶ | WidgetConfig | Input for the widget instance configuration. It is used to populate the widget editor. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| closed ¶ | WidgetConfig | undefined | Emits the edited widget instance configuration if the user confirms by saving, or |
| editorSetupCompleted ¶ | void | Emits when the editor instantiation is completed. |
| widgetConfigChangerequired ¶ | WidgetConfig | Input for the widget instance configuration. It is used to populate the widget editor. |
Widget renderer¶
The SiWidgetRendererComponent is a presentational (dumb) component that renders a single widget instance from a WidgetConfig, without the surrounding dashboard or grid infrastructure. It takes the exact Widget definition to render and delegates the actual rendering to the widget host.
Use it to display an individual widget outside of a flexible dashboard, for example in kiosk mode or within a custom layout such as a carousel. The component is a self-contained widget cell that can be placed anywhere a single widget needs to be shown.
It requires two inputs: the widgetConfig describing the widget instance to render and the matching widget definition. The widget must match the config's widgetId.
<!-- Render a single widget instance -->
<si-widget-renderer [widgetConfig]="widgetConfig" [widget]="widget" />
import { SiWidgetRendererComponent } from '@siemens/dashboards-ng';A presentational (dumb) component that renders a single widget instance from a WidgetConfig using the provided Widget definition. It delegates the actual rendering to the SiWidgetHostComponent.
Intended Usage
This component renders an individual widget outside of a dashboard or grid, without requiring manual host wiring. It is a self-contained widget cell that can be placed anywhere a single widget needs to be shown, for example in kiosk mode or within a custom layout such as a carousel.
Example
<!-- Render a single widget instance -->
<si-widget-renderer [widgetConfig]="widgetConfig" [widget]="widget" />
Input Properties¶
| Name | Type | Description |
|---|---|---|
| widgetrequired ¶ | Widget | The Widget definition used to render the given widgetConfig. It must match the config's |
| widgetConfigrequired ¶ | WidgetConfig | The configuration of the widget instance to render. |
Security considerations¶
Widgets can be loaded via Module Federation, Native Federation or as web components from a URL. The loaded code is executed in your application. Only register widget factories that point to trusted sources.
Types Documentation¶
Dashboard configuration object. Inject globally using the SI_DASHBOARD_CONFIGURATION or configure individual dashboard instances.
Union type for all possible items in the dashboard toolbar.
Configuration object for the si-grid component, including the options of gridstack.
-
The configuration options of gridstack.
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.
Widgets describe the entries within the widget catalog and holds all default configuration and factory functionality to instantiate a widget instance, represented as WidgetConfig objects.
-
The factory to instantiate a widget instance component that is added to the dashboard.
-
Optional default values that can be set to widget instances.
defaults?:
Pick<WidgetConfig, "width" | "height" | "minWidth" | "minHeight" | "heading" | "headingIcon" | "expandable" | "immutable" | "image" | "accentLine">¶ -
An optional description that is visible in the widget catalog.
-
A CSS icon class that specifies the widget icon, displayed in the catalog.
-
A unique id of the widget.
-
The name of the widget that is presented in the widget catalog.
-
Optional default payload object that is copied into every widget instance WidgetConfig.
-
An optional version string.
A 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.
-
Optional type of the accent line.
-
Defines whether the widget instance component can be expanded and enlarged over the dashboard.
-
grid item header text.
-
Icon name or a single-entry map of camelCase icon name to SVG data URI.
headingIcon?:
string | Record<string, string>¶ -
Height of the grid item, where number represents how many rows it takes. (default?: 1)
-
A unique id of a widget instance
-
Optional configuration for an image to be displayed on the widget instance.
-
minimum height allowed during resize/creation (default?: undefined = un-constrained)
-
minimum width allowed during resize/creation (default?: undefined = un-constrained)
-
A widget specific payload object. Placeholder to pass in additional configuration.
-
If true, the widget host renders a placeholder and waits for explicit configuration before instantiating the widget instance component.
Indicates that initial setup by the user is still pending. The flag flips to
falseonce the setup has been completed. -
Optionally, the version widget description that was used to create the widget config.
-
The id of the widget descriptor that was used to instantiate the
WidgetConfigand the widget instance component. -
Width of the grid item, where number represents how many columns it spans (default?: 1)
-
Grid item position on x axis of the grid (default?: 0)
-
Grid item position on y axis of the grid (default?: 0)
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 use @siemens/element-ng/menu#MenuItem
• for SiContentActionBarComponent use @siemens/element-ng/menu#MenuItem and ContentActionBarMainItem
• for SiNavbarVerticalComponent use NavbarVerticalItem
• for @siemens/dashboards-ng#SiFlexibleDashboardComponent use @siemens/dashboards-ng#DashboardToolbarItem
-
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.
action?:
string | ((param?: any) => void | any)Inherited from Link¶ -
Defines the content of the optional badge. Should be a number or something like "100+". if undefined or empty string, no badge is displayed
-
Defines the background color of the badge. Default is specific to Element flavour.
-
Show a dot badge without content?
-
Defines the badge style
badgeStyle?:
"" | "inline" | "dot"¶ -
Defines if custom content is chosen in account dropdown (otherwise accountItems are used)
-
A boolean that lets the link know whether it is disabled or not.
-
Whether the menu items sub-menu should open upwards instead of downwards.
-
If the menu item has children you can specify if they are visible or not.
-
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.
-
The web font icon class name (e.g. element-settings-outline).
-
Defines if only the icon is shown in the default navigation bar.
-
An optional id to uniquely identify the menu item.
-
The value for an image src tag. Maybe a relative or absolute link to an jpg or gif image.
-
A boolean that lets the link know whether it is active or not. It is useful when action() is executed instead of link route.
-
Whether the menu item should be displayed as a heading/title, will also disable links and actions.
-
A navigation bar item can have a sub-menu, if these items are set. They define the sub-menu content.
-
Defines the link of the menu item within the application using the angular router link concept. Accepts an array of
anyas per [routerLink API definition]https://angular.dev/api/router/RouterLink. -
For single/multi choice items: the kind of icon to show.
selectionState?:
"" | "check" | "radio"¶ -
The target attribute specifies where to open the linked document. If no target is specified, the link will open in the current tab.
-
The title of the menu item. Can be either the title to be displayed or the translation key.
title?:
TranslatableStringInherited from Link¶ -
The optional tooltip of the link. Can be either the text to be displayed or the translation key.
tooltip?:
TranslatableStringInherited from Link¶ -
Type to distinguish between check and radio menu items. Needs to be set for correct interaction and used for a11y.
Factory type that is either a WidgetComponentTypeFactory, FederatedModule, FederatedBridgeModule or WebComponent.
Interface representing an action item in the dashboard toolbar.
-
Action that called when the item is triggered.
action:
(grid: SiGridComponent) => void¶ -
Label that is shown to the user.
Interface representing a router link item in the dashboard toolbar.
-
Navigation extras that are passed to the RouterLink.
-
Label that is shown to the user.
-
Link for the angular router. Accepts the same values as RouterLink.
routerLink:
string | any[]¶
FederatedModule
CommonFactoryFields & LoadRemoteModuleOptions & { factoryType: 'module-federation' | 'native-federation'; [index: string]: any; } ¶Factory configuration for loading widget components from a federated module. Supports both Module Federation and Native Federation patterns for micro-frontend architectures. Use this when the widget component is hosted in a separate, independently deployed application.
WebComponent
CommonFactoryFields & { factoryType: 'web-component'; url: string; [index: string]: any; } ¶FederatedBridgeModule
CommonFactoryFields & LoadRemoteBridgeOptions & { factoryType: 'native-federation-module-bridge'; [index: string]: any; } ¶Use this when having native federation shell and remote module is using module federation.
Image is used to configure an image to be displayed on a widget instance.
-
The HTMLImageElement property alt provides fallback (alternate) text to display when the image specified by the <img> element is not loaded.
-
Defines if an image is placed on top or start (left) of the card.
-
Sets the image object-fit CSS property.
-
Sets the image object-position CSS property.
-
The image URL (See <img>).
CommonFactoryFields
{ componentName: string; editorComponentName?: string; /** * CSS class that is added to the modal dialog when component editor dialog is shown. * Provides the option to change the size if the dialog. */ editorModalClass?: string; } ¶-
CSS class that is added to the modal dialog when component editor dialog is shown. Provides the option to change the size if the dialog.
ModuleOptions
WidgetComponentTypeBaseConfig & { moduleName: string; moduleLoader: (name: string) => Promise<any>; componentLoader?: never; } ¶Use when component is not standalone and part of a module
-
factoryType?:
"default"¶ -
moduleLoader:
(name: string) => Promise<any>¶
StandaloneOptions
WidgetComponentTypeBaseConfig & { componentLoader: <T = unknown>(componentName: string) => Promise<Type<T>>; moduleName?: never; moduleLoader?: never; } ¶Use when component is standalone
-
componentLoader:
<T = unknown>(componentName: string) => Promise<Type<T>>¶ -
factoryType?:
"default"¶
The Remote Module definition is based on @angular-architects. We take it over into this file to prevent adding a hard dependency.
LoadRemoteBridgeOptions
{ id: string; options?: | { loadFactory?: boolean | undefined; from: 'build' | 'runtime'; } | undefined; } ¶Definition is based on @module-federation/enhanced loadRemote options. We take it over into this file to prevent adding a hard dependency.
ObjectFit configuration options for a widget image.
See: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
-
factoryType?:
"default"¶
LoadRemoteModuleScriptOptions
{ type?: 'script'; remoteEntry?: string; remoteName: string; exposedModule: string; /** * Optional nonce value applied to the script element for Content Security Policy (CSP) support. * Supported in Module Federation v21.2.0+; safely ignored by earlier versions. */ nonce?: string; } ¶-
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.
-
A boolean that lets the link know whether it is disabled or not.
-
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.
-
A boolean that lets the link know whether it is active or not. It is useful when action() is executed instead of link route.
-
Defines the link of the menu item within the application using the angular router link concept. Accepts an array of
anyas per [routerLink API definition]https://angular.dev/api/router/RouterLink. -
The target attribute specifies where to open the linked document. If no target is specified, the link will open in the current tab.
-
The title of the menu item. Can be either the title to be displayed or the translation key.
-
The optional tooltip of the link. Can be either the text to be displayed or the translation key.
Except where otherwise noted, content on this site is licensed under MIT License.