# SiWidgetRendererComponent documentation

**Kind:** component

**Selector:** `si-widget-renderer`

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

A presentational (dumb) component that renders a single widget instance from a [WidgetConfig](<index.html#t:WidgetConfig>) using the provided [Widget](<index.html#t: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**

```html
<!-- Render a single widget instance -->
<si-widget-renderer [widgetConfig]="widgetConfig" [widget]="widget" />
```

```
component SiWidgetRendererComponent
```

#### Input Properties

| Name | Type | Description |
| --- | --- | --- |
| [widget](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/components/widget-renderer/si-widget-renderer.component.ts#L43-L43>) (required) | `Widget` | The [Widget](<index.html#t:Widget>) definition used to render the given [widgetConfig](<index.html#SiWidgetRendererComponent.widgetConfig>). It must match the config's `widgetId`. |
| [widgetConfig](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/components/widget-renderer/si-widget-renderer.component.ts#L37-L37>) (required) | `WidgetConfig` | The configuration of the widget instance to render. |

### Types Documentation

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

**Kind:** interface

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

Widgets describe the entries within the widget catalog and holds all default configuration and factory functionality to instantiate a widget instance, represented as [WidgetConfig](<index.html#t:WidgetConfig>) objects.

```
interface Widget
```

#### Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [badge](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L46-L46>) (optional) | `TranslatableString` |  | Optional translatable badge text displayed next to the widget name in the catalog, for example, "Requires license" when creation is disabled with `maxInstances: 0`. Consumer badges use the info style. The built-in added badge takes precedence when a positive instance limit has been reached. |
| [componentFactory](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L50-L50>) | `WidgetComponentFactory` |  | The factory to instantiate a widget instance component that is added to the dashboard. |
| [defaults](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L52-L64>) (optional) | `Pick<WidgetConfig, "width" \| "height" \| "minWidth" \| "minHeight" \| "heading" \| "headingIcon" \| "expandable" \| "immutable" \| "image" \| "accentLine">` |  | Optional default values that can be set to widget instances. |
| [description](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L25-L25>) (optional) | `TranslatableString` |  | An optional description that is visible in the widget catalog. |
| [iconClass](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L48-L48>) (optional) | `string` |  | A CSS icon class that specifies the widget icon, displayed in the catalog. |
| [id](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L19-L19>) | `string` |  | A unique id of the widget. |
| [maxInstances](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L39-L39>) (optional) | `number` | `undefined` | Maximum number of instances of this widget that can be added through the catalog.<br><br>• `undefined` (default): unlimited instances.<br><br>• `0`: creation is disabled, but the widget stays visible in the catalog.<br><br>• `n > 0`: creation is allowed until `n` instances with the same `widgetId` exist on the dashboard. Once the limit is reached, the catalog entry is disabled and marked as added.<br><br>@remarks: This limit applies to the catalog only. It does not restrict programmatic calls to `addWidgetInstance()`. |
| [name](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L23-L23>) | `TranslatableString` |  | The name of the widget that is presented in the widget catalog. |
| [payload](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L66-L66>) (optional) | `any` |  | Optional default payload object that is copied into every widget instance [WidgetConfig](<index.html#t:WidgetConfig>). |
| [version](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L21-L21>) (optional) | `string` |  | An optional version string. |

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

**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#L231-L231>) (optional) | `AccentLineType` | Optional type of the accent line. |
| [actionBarViewType](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L221-L221>) (optional) | `ViewType` |  |
| [expandable](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L210-L210>) (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#L206-L206>) (optional) | `TranslatableString` | grid item header text. |
| [headingIcon](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L208-L208>) (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#L186-L186>) (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#L169-L169>) | `string` | A unique id of a widget instance |
| [image](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L227-L227>) (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#L223-L223>) (optional) | `boolean` |  |
| [isNotRemovable](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L222-L222>) (optional) | `boolean` |  |
| [minHeight](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L202-L202>) (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#L198-L198>) (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#L212-L212>) (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#L220-L220>) (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#L178-L178>) (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#L174-L174>) | `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#L182-L182>) (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#L190-L190>) (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#L194-L194>) (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
```

### [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#L139-L161>)

**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#L148-L148>) | `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#L152-L152>) (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#L156-L156>) (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#L160-L160>) (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#L143-L143>) | `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'
```

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

**Kind:** type alias

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

Factory type that is either a [WidgetComponentTypeFactory](<index.html#t:WidgetComponentTypeFactory>), [FederatedModule](<index.html#t:FederatedModule>), [FederatedBridgeModule](<index.html#t:FederatedBridgeModule>) or [WebComponent](<index.html#t:WebComponent>).

```
type WidgetComponentFactory = WidgetComponentTypeFactory | FederatedModule | WebComponent | FederatedBridgeModule
```

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

**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'
```

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

**Kind:** type alias

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

```
type WidgetComponentTypeFactory = CommonFactoryFields & (ModuleOptions | StandaloneOptions)
```

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

**Kind:** type alias

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

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.

```
type FederatedModule = CommonFactoryFields &
  LoadRemoteModuleOptions & {
    factoryType: 'module-federation' | 'native-federation';
    [index: string]: any;
  }
```

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

**Kind:** type alias

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

```
type WebComponent = CommonFactoryFields & {
  factoryType: 'web-component';
  url: string;
  [index: string]: any;
}
```

#### Index Signatures

| Name | Type | Description |
| --- | --- | --- |
| [\[index: string\]](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L127-L127>) | `any` |  |

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

**Kind:** type alias

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

Use this when having native federation shell and remote module is using module federation.

```
type FederatedBridgeModule = CommonFactoryFields &
  LoadRemoteBridgeOptions & {
    factoryType: 'native-federation-module-bridge';
    [index: string]: any;
  }
```

#### Index Signatures

| Name | Type | Description |
| --- | --- | --- |
| [\[index: string\]](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L121-L121>) | `any` |  |

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

**Kind:** type alias

```
type 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;
}
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [componentName](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L74-L74>) | `string` |  |
| [editorComponentName](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L75-L75>) (optional) | `string` |  |
| [editorModalClass](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L80-L80>) (optional) | `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](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L89-L93>)

**Kind:** type alias

Use when component is not standalone and part of a module

```
type ModuleOptions = WidgetComponentTypeBaseConfig & {
  moduleName: string;
  moduleLoader: (name: string) => Promise<any>;
  componentLoader?: never;
}
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [componentLoader](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L92-L92>) (optional) | `undefined` |  |
| [factoryType](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L84-L84>) (optional) | `"default"` |  |
| [moduleLoader](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L91-L91>) | `(name: string) => Promise<any>` |  |
| [moduleName](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L90-L90>) | `string` |  |

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

**Kind:** type alias

Use when component is standalone

```
type StandaloneOptions = WidgetComponentTypeBaseConfig & {
  componentLoader: <T = unknown>(componentName: string) => Promise<Type<T>>;
  moduleName?: never;
  moduleLoader?: never;
}
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [componentLoader](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L97-L97>) | `<T = unknown>(componentName: string) => Promise<Type<T>>` |  |
| [factoryType](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L84-L84>) (optional) | `"default"` |  |
| [moduleLoader](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L99-L99>) (optional) | `undefined` |  |
| [moduleName](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L98-L98>) (optional) | `undefined` |  |

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

**Kind:** type alias

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

The Remote Module definition is based on `@angular-architects`. We take it over into this file to prevent adding a hard dependency.

```
type LoadRemoteModuleOptions = LoadRemoteModuleScriptOptions | LoadRemoteModuleEsmOptions | LoadRemoteModuleManifestOptions
```

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

**Kind:** type alias

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

Definition is based on `@module-federation/enhanced` loadRemote options. We take it over into this file to prevent adding a hard dependency.

```
type LoadRemoteBridgeOptions = {
  id: string;
  options?:
    | {
        loadFactory?: boolean | undefined;
        from: 'build' | 'runtime';
      }
    | undefined;
}
```

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

**Kind:** type alias

```
type WidgetComponentTypeBaseConfig = {
  factoryType?: 'default';
  [index: string]: any;
}
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [factoryType](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L84-L84>) (optional) | `"default"` |  |

#### Index Signatures

| Name | Type | Description |
| --- | --- | --- |
| [\[index: string\]](<https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/widgets.model.ts#L85-L85>) | `any` |  |

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

**Kind:** type alias

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

```
type 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;
}
```

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

**Kind:** type alias

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

```
type LoadRemoteModuleEsmOptions = {
  type: 'module';
  remoteEntry: string;
  exposedModule: string;
}
```

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

**Kind:** type alias

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

```
type LoadRemoteModuleManifestOptions = {
  type: 'manifest';
  remoteName: string;
  exposedModule: string;
}
```
