# List dashboard widget

**List dashboard widget** provides a quick-glance overview of list items, offering users a shortcut to view and access key information directly.

## Usage

The list dashboard widget is used for presenting lists in a compact format, allowing users to scan and interact with items quickly. It optionally allows search and sorting. It can include:

- Brief descriptions to provide context.
- Links for direct navigation.
- Actionable items for quick task initiation.

![List dashboard widget](<../images/list-dashboard-widget.png>)

### When to use

- In dashboards and [tile layouts](<https://element.siemens.io/fundamentals/layouts/content/#tile-layout>).
- To provide a ranked or organized list of items.
- When users need quick access to key information without navigating away.
- To summarize essential metrics, statuses, or items at a glance.
- When displaying frequently updated data in a compact format.

### Best practices

- Prioritize relevant information.
- Limit additional elements (e.g., badges or actions) to avoid visual clutter and improve readability.
- Enable sorting and search for lists with more than a few items to simplify navigation.
- Use [empty state](<https://element.siemens.io/components/status-notifications/empty-state/>) to represent empty values.

## Design

### Elements

![List dashboard widget elements](<../images/list-widget-elements.png>)

> 1. Heading, 2. Action, 3. Search, 4. Footer link, 5. Indicator, 6. Row title, 7. Description, 8. Value, 9. Row action

With the exception of the Row title (6), all items are optional.

### Variants

Each item can display a title or a [link](<https://element.siemens.io/components/buttons-menus/links/>), with an optional description.

![List dashboard widget title examples](<../images/list-widget-titles.png>)

The indicator can be customized to show an icon, status or a [badge](<https://element.siemens.io/components/status-notifications/badges/>).

![List dashboard widget indicator examples](<../images/list-widget-indicators.png>)

The header action supports sorting items and other actions as needed. Content overflow is managed with an internal scrollbar, and the widget height can be configured to either full or fixed height according to layout needs.

This component is flexible enough to accommodate additional options, allowing for tailored solutions.

## Code

We support the list widget in two ways:

- Angular components that are configured by data objects to support minimum effort on the application development.
- HTML and CSS-based to support maximum flexibility.

### List widget component

To simplify the usage and reduce the code, Element offers a Angular component as wrapper with streamlined inputs. The component is a wrapper around the [card](<https://element.siemens.io/components/layout-navigation/cards/>) and the `<si-list-widget-body>`.

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

@Component({
  :
  imports: [SiListWidgetComponent]
})
```

Add the empty state component by content projection with the `empty-state` slot.

```
<si-list-widget search [heading]="'Heading'" [value]="items">
  <si-empty-state empty-state [icon]="'element-info'" [heading]="'No buildings found.'" />
</si-list-widget>
```

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { ChangeDetectorRef, Component, inject } from '@angular/core';
import { SiListWidgetComponent, SiListWidgetItem } from '@siemens/element-ng/dashboard';
import { SiEmptyStateComponent } from '@siemens/element-ng/empty-state';
import { Link } from '@siemens/element-ng/link';

@Component({
  selector: 'app-sample',
  imports: [SiEmptyStateComponent, SiListWidgetComponent],
  templateUrl: './si-list-widget.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  items: SiListWidgetItem[] = [
    {
      label: { title: 'Taj Mahal', href: 'https://en.wikipedia.org/wiki/Taj_Mahal' },
      description: 'The Taj Mahal is an ivory-white marble mausoleum',
      badge: '99+',
      badgeColor: 'warning',
      text: '10.7',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: {
        title: 'Tower of Pisa',
        href: 'https://en.wikipedia.org/wiki/Leaning_Tower_of_Pisa'
      },
      description: 'The Leaning Tower of Pisa is the campanile of Pisa Cathedral.',
      badge: 'info',
      badgeColor: 'info',
      text: '9.7',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: 'Eiffel Tower',
      description:
        'The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris.',
      badge: '3',
      text: '8.3',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: 'Colosseum',
      badge: '5',
      text: '12.7',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: 'Burj Khalifa',
      badge: '5',
      text: '4.5',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: "St. Basil's Cathedral",
      badge: '6',
      text: '11.1',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    }
  ];

  itemsEmpty?: SiListWidgetItem[] = undefined;
  itemsA?: SiListWidgetItem[] = undefined;
  itemsB = this.items.map(value => ({ ...value, text: undefined }));
  itemsC = this.items.map(value => ({ ...value, badge: undefined }));
  itemsD = this.items.map(value => ({ ...value, badge: undefined, text: undefined }));
  itemsE = this.items.map(value => ({ ...value, action: undefined }));
  itemsF = this.items.map(value => ({ ...value, text: undefined, action: undefined }));
  itemsG = this.items.map(value => ({ ...value, badge: undefined, action: undefined }));
  itemsH = this.items.map(value => ({
    ...value,
    badge: undefined,
    text: undefined,
    action: undefined
  }));

  link: Link = { title: 'Home', 'link': '/' };
  actionLink: Link = { title: 'Print', 'action': () => alert('This is an action link') };

  private cdRef = inject(ChangeDetectorRef);

  constructor() {
    setTimeout(() => {
      this.itemsEmpty = [];
      this.itemsA = this.items;
      this.cdRef.markForCheck();
    }, 2000);
  }
}
```

Template:

```html
<div class="row">
  <si-list-widget
    class="col-4 mt-6"
    search
    heading="Heading"
    sort="ASC"
    [value]="itemsA"
    [link]="link"
  >
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget>

  <si-list-widget class="col-4 mt-6" search heading="Heading" sort="ASC" [value]="itemsB">
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget>

  <si-list-widget class="col-4 mt-6" heading="Heading" sort="ASC" [value]="itemsC" />
  <si-list-widget class="col-4 mt-6" heading="Heading" sort="ASC" [value]="itemsD" [link]="link" />

  <si-list-widget class="col-4 mt-6" heading="Heading" sort="ASC" [value]="itemsE" [link]="link">
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget>

  <si-list-widget class="col-4 mt-6" heading="Heading" sort="ASC" [value]="itemsF" [link]="link">
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget>

  <si-list-widget class="col-4 mt-6" heading="Heading" sort="ASC" [value]="itemsG" [link]="link">
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget>

  <si-list-widget class="col-4 mt-6" heading="Heading" sort="DSC" [value]="itemsH" [link]="link">
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget>

  <si-list-widget
    class="col-4 mt-6"
    heading="Heading"
    sort="ASC"
    [value]="itemsEmpty"
    [link]="link"
  >
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget>
</div>
```

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

**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[]>`

### List widget body component

The body of the `<si-list-widget>` is implemented in the component `<si-list-widget-body>`. You can use it for compositions.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { ChangeDetectorRef, Component, inject } from '@angular/core';
import { SiListWidgetBodyComponent, SiListWidgetItem } from '@siemens/element-ng/dashboard';
import { SiEmptyStateComponent } from '@siemens/element-ng/empty-state';
import { Link } from '@siemens/element-ng/link';

@Component({
  selector: 'app-sample',
  imports: [SiEmptyStateComponent, SiListWidgetBodyComponent],
  templateUrl: './si-list-widget-body.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  items: SiListWidgetItem[] = [
    {
      label: { title: 'Taj Mahal', href: 'https://en.wikipedia.org/wiki/Taj_Mahal' },
      description: 'The Taj Mahal is an ivory-white marble mausoleum',
      badge: '99+',
      badgeColor: 'warning',
      text: '10.7',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: {
        title: 'Tower of Pisa',
        href: 'https://en.wikipedia.org/wiki/Leaning_Tower_of_Pisa'
      },
      description: 'The Leaning Tower of Pisa is the campanile of Pisa Cathedral.',
      badge: 'info',
      badgeColor: 'info',
      text: '9.7',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: 'Eiffel Tower',
      description:
        'The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris.',
      badge: '3',
      text: '8.3',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: 'Colosseum',
      badge: '5',
      text: '12.7',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: 'Burj Khalifa',
      badge: '5',
      text: '4.5',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    },
    {
      label: "St. Basil's Cathedral",
      badge: '6',
      text: '11.1',
      action: { title: 'Building overview', action: () => alert('Report') },
      actionIcon: 'element-report'
    }
  ];

  itemsEmpty?: SiListWidgetItem[] = undefined;
  itemsA?: SiListWidgetItem[] = undefined;
  itemsB = this.items.map(value => ({ ...value, text: undefined }));
  itemsC = this.items.map(value => ({ ...value, badge: undefined }));
  itemsD = this.items.map(value => ({ ...value, badge: undefined, text: undefined }));
  itemsE = this.items.map(value => ({ ...value, action: undefined }));
  itemsF = this.items.map(value => ({ ...value, text: undefined, action: undefined }));
  itemsG = this.items.map(value => ({ ...value, badge: undefined, action: undefined }));
  itemsH = this.items.map(value => ({
    ...value,
    badge: undefined,
    text: undefined,
    action: undefined
  }));

  link: Link = { title: 'Home', 'link': '/' };
  actionLink: Link = { title: 'Print', 'action': () => alert('This is an action link') };

  private cdRef = inject(ChangeDetectorRef);

  constructor() {
    setTimeout(() => {
      this.itemsEmpty = [];
      this.itemsA = this.items;
      this.cdRef.markForCheck();
    }, 2000);
  }
}
```

Template:

```html
<div class="d-flex gap-4">
  <si-list-widget-body class="col-6" search [value]="itemsA">
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget-body>

  <si-list-widget-body class="col-4" [value]="itemsA" [showLoadingIndicator]="true">
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget-body>
  <si-list-widget-body class="col-6" search style="height: 350px" [value]="itemsA">
    <si-empty-state
      empty-state
      icon="element-info"
      heading="No buildings found."
      content="Please refine your search."
    />
  </si-list-widget-body>
</div>
```

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

**Kind:** component

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

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

The `<si-list-widget-body>` implements the body of the \<si-list-widget\> that can be used for composition within other components.

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

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [compareFn](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-body.component.ts#L107-L113>) | `(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-body.component.ts#L136-L141>) | `(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. |
| [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-body.component.ts#L57-L57>) | `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-body.component.ts#L148-L148>) | `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-body.component.ts#L82-L82>) | `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-body.component.ts#L67-L69>) | `TranslatableString` | `` $localize`:@@SI_LIST_WIDGET.SEARCH_PLACEHOLDER:Search…` `` | label for the "search placeholder" name |
| [searchText](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-body.component.ts#L211-L211>) (protected) | `string` | `''` | Current search term used to filter the displayed list items. |
| [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-body.component.ts#L75-L75>) | `SortOrder \| undefined` |  | Enable ascending and descending SiListWidgetItem sorting. If enabled, items are initially ascending sorted. |
| [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 |
| --- | --- | --- |
| [searchTextChange](<https://github.com/siemens/element/blob/main/projects/element-ng/dashboard/widgets/si-list-widget/si-list-widget-body.component.ts#L211-L211>) (protected) | `string` | Current search term used to filter the displayed list items. |

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

### CSS class usage

For more flexibility and control, use the CSS classes directly in the `<si-card>` component.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { SiCardComponent } from '@siemens/element-ng/card';
import { ContentActionBarMainItem } from '@siemens/element-ng/content-action-bar';
import { Link, SiLinkDirective } from '@siemens/element-ng/link';
import { SiSearchBarComponent } from '@siemens/element-ng/search-bar';
import { LOG_EVENT } from '@siemens/live-preview';

@Component({
  selector: 'app-sample',
  imports: [SiCardComponent, SiLinkDirective, SiSearchBarComponent],
  templateUrl: './si-list-widget-css.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
  simplLink: Link = {
    title: 'Link',
    link: '/'
  };

  primaryActions: ContentActionBarMainItem[] = [
    {
      type: 'action',
      label: 'Sort up',
      icon: 'element-sort-up',
      iconOnly: true,
      action: () => this.logEvent('Sort up')
    }
  ];
}
```

Template:

```html
<div class="row">
  <div class="col-4 mb-6">
    <si-card
      class="h-100"
      heading="Heading"
      actionBarViewType="expanded"
      [primaryActions]="primaryActions"
    >
      <div class="d-flex flex-column flex-grow-1 flex-shrink-1" body>
        <div class="px-6 py-4">
          <si-search-bar showIcon colorVariant="base-0" />
        </div>
        <ul class="list list-divider">
          <li class="list-item d-flex align-items-center">
            <span class="badge bg-default mx-0">2</span>
            <span class="ps-4 me-auto si-h5">Building B</span>
            <span class="">10.7</span>
            <button
              type="button"
              class="btn btn-icon btn-tertiary element-export ms-4"
              aria-label="Action on building"
              (click)="logEvent('Action on building')"
            ></button>
          </li>
          <li class="list-item d-flex align-items-center">
            <span class="badge bg-default mx-0">2</span>
            <span class="ps-4 me-auto si-h5">Building B</span>
            <span class="">10.7</span>
            <button
              type="button"
              class="btn btn-icon btn-tertiary element-export ms-4"
              aria-label="Action on building"
              (click)="logEvent('Action on building')"
            ></button>
          </li>
          <li class="list-item d-flex align-items-center">
            <span class="badge bg-default mx-0">3</span>
            <span class="ps-4 me-auto si-h5">Building B</span>
            <span class="">10.7</span>
            <button
              type="button"
              class="btn btn-icon btn-tertiary element-export ms-4"
              aria-label="Action on building"
              (click)="logEvent('Action on building')"
            ></button>
          </li>
          <li class="list-item d-flex align-items-center">
            <span class="badge bg-default mx-0">5</span>
            <span class="ps-4 me-auto si-h5">Building B</span>
            <span class="">10.7</span>
            <button
              type="button"
              class="btn btn-icon btn-tertiary element-export ms-4"
              aria-label="Action on building"
              (click)="logEvent('Action on building')"
            ></button>
          </li>
          <li class="list-item d-flex align-items-center">
            <span class="badge bg-default mx-0">5</span>
            <span class="ps-4 me-auto si-h5">Building B</span>
            <span class="">10.7</span>
            <button
              type="button"
              class="btn btn-icon btn-tertiary element-export ms-4"
              aria-label="Action on building"
              (click)="logEvent('Action on building')"
            ></button>
          </li>
          <li class="list-item d-flex align-items-center">
            <span class="badge bg-default mx-0">6</span>
            <span class="ps-4 me-auto si-h5">Building B</span>
            <span class="">10.7</span>
            <button
              type="button"
              class="btn btn-icon btn-tertiary element-export ms-4"
              aria-label="Action on building"
              (click)="logEvent('Action on building')"
            ></button>
          </li>
        </ul>
      </div>

      <div class="card-footer" footer>
        <a [siLink]="simplLink">
          {{ simplLink.title }}
          <i aria-hidden="true" class="link-icon link-end element-right-2 flip-rtl"></i>
        </a>
      </div>
    </si-card>
  </div>
</div>
```

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