# SiListWidgetComponent documentation

**Kind:** component

**Selector:** `si-list-widget`

```
import { SiListWidgetComponent } from '@siemens/element-ng/dashboard';
```

The `<si-list-widget>` supports an easy composition of links and actions with support for skeleton loading indicator, wrapped in a card.

```
component SiListWidgetComponent extends SiWidgetBaseDirective<SiListWidgetItem[]> implements OnChanges
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [accentLine](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L167-L167>) | `AccentLineType \| undefined` |  | Optional accent line |
| [compareFn](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L122-L128>) | `(a: SiListWidgetItem, b: SiListWidgetItem) => number \| undefined` | `(     a: SiListWidgetItem,     b: SiListWidgetItem   ) => {     const aLabel = typeof a.label === 'object' ? a.label.title! : a.label;     const bLabel = typeof b.label === 'object' ? b.label.title! : b.label;     return aLabel.localeCompare(bLabel);   }` | Compare function of for two `SiListWidgetItem`s that is used to sort the array of items. The default compares the item labels by using the string `localeCompare()` function.<br><br>Returns: A value `< 0` if `a` is smaller, `> 0` if `b` is smaller, otherwise `0`. |
| [disableAutoLoadingIndicator](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-widget-base.directive.ts#L35-L35>) (inherited) | `boolean` | `false` | Option to disable automatic start of skeleton loading indication.<br><br>Inherited from `SiWidgetBaseDirective<SiListWidgetItem[]>` |
| [filterFn](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L151-L156>) | `(item: SiListWidgetItem, searchTerm: string) => boolean \| undefined` | `(     item: SiListWidgetItem,     searchTerm: string   ) => {     const aLabel = typeof item.label === 'object' ? item.label.title! : item.label;     return aLabel.toLowerCase().includes(searchTerm.toLowerCase());   }` | Filter function that is used to filter down the list items when the user enters a term in the search bar. Default function.<br><br>Returns: `true` if the `searchTerm` matches the `item` and the `item` shall be kept in the list. |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L50-L50>) | `TranslatableString \| undefined` |  | List widget heading. |
| [initialLoadingIndicatorDebounceTime](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-widget-base.directive.ts#L59-L59>) (inherited) | `number` | `300` | Initial delay time in milliseconds before enabling loading indicator. Only used once initially during construction.<br><br>Inherited from `SiWidgetBaseDirective<SiListWidgetItem[]>` |
| [link](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L53-L53>) | `Link \| undefined` |  | Optional footer link for the list widget |
| [numberOfLinks](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L163-L163>) | `number` | `6` | The number of skeleton progress indication rows. |
| [search](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L97-L97>) | `boolean` | `false` | Enables the search functionality. |
| [searchPlaceholderLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L63-L65>) | `TranslatableString` | `` $localize`:@@SI_LIST_WIDGET.SEARCH_PLACEHOLDER:Search…` `` | label for the "search placeholder" name |
| [showLoadingIndicator](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-widget-base.directive.ts#L41-L45>) (inherited) | `boolean` | `false` | Input to start and stop the skeleton loading indication.<br><br>Inherited from `SiWidgetBaseDirective<SiListWidgetItem[]>` |
| [sort](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L90-L90>) | `SortOrder \| undefined` |  | Set `ASC` of ascending sorting, `DSC` for descending sorting and `undefined` for no sorting. |
| [sortAscendingLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L73-L75>) | `TranslatableString` | `` $localize`:@@SI_LIST_WIDGET.SORT_ASCENDING:Sort ascending` `` |  |
| [sortDescendingLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L83-L85>) | `TranslatableString` | `` $localize`:@@SI_LIST_WIDGET.SORT_DESCENDING:Sort descending` `` |  |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-widget-base.directive.ts#L29-L29>) (required, inherited) | `SiListWidgetItem[] \| undefined` |  | The main value to be displayed. If no value is set, the skeleton indicates the loading of the value. Disable the automatic loading mechanism by setting `SiWidgetBodyBaseComponent.disableAutoLoadingIndicator`.<br><br>Inherited from `SiWidgetBaseDirective<SiListWidgetItem[]>` |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [sortChange](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget.component.ts#L90-L90>) | `SortOrder \| undefined` | Set `ASC` of ascending sorting, `DSC` for descending sorting and `undefined` for no sorting. |

#### Attributes and Methods

##### showLoadingIndicator

[Source for showLoadingIndicator](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-widget-base.directive.ts#L49-L51>)

**Modifiers:** readonly, inherited

**Type:** `Signal<boolean>`

**Default:** `...`

Inherited from `SiWidgetBaseDirective<SiListWidgetItem[]>`

### Types Documentation

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

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

### [SiListWidgetItem](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-item.component.ts#L16-L34>)

**Kind:** interface

```
import type { SiListWidgetItem } from '@siemens/element-ng/dashboard';
```

Interface for objects to configure the the list widget.

```
interface SiListWidgetItem
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [action](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-item.component.ts#L31-L31>) (optional) | `Link` | Optional right aligned action. |
| [actionIcon](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-item.component.ts#L33-L33>) (optional) | `string` | The action icon. |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-item.component.ts#L22-L22>) (optional) | `TranslatableString` | Optional translatable string to be displayed in a badge. |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-item.component.ts#L27-L27>) (optional) | `string` | Defines the badge color. Must be one of the element `bg-<color>` CSS classes, like `bg-primary`, `bg-secondary`, 'bg-caution'. Use only the name without `bg`. |
| [description](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-item.component.ts#L20-L20>) (optional) | `TranslatableString` | Optional translatable description. |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-item.component.ts#L18-L18>) | `TranslatableString \| Link` | Label is either a translatable string or a link. |
| [text](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-item.component.ts#L29-L29>) (optional) | `TranslatableString` | Optional translatable text that is display to the right. |

### [SortOrder](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-body.component.ts#L30-L30>)

**Kind:** type alias

```
import type { SortOrder } from '@siemens/element-ng/dashboard';
```

Defines the sort order.

```
type SortOrder = 'ASC' | 'DSC'
```

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

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