# Filtered search

**Filtered search** enables to search for free text in combination with structured search criteria. The criteria are any numbers of criterion objects with a name and a value.

## Usage

![Filtered search](<../images/filtered-search.png>)

### When to use

- When users may not know exactly what they are looking for and want to explore options by selecting different filters.
- Use it when free-text search alone isn't enough, and structured criteria add value to the search process.
- Use it to create filter formulas by adding or excluding conditions.
- Use it where there is enough horizontal space to display filter options without cluttering the interface.
- If users need to apply many filters, especially with nested or hierarchical structures, consider other [filter patterns](<https://element.siemens.io/patterns/filter/>).

### Best practices

- Use filtered Search with simple filter patterns (e.g. string, enumeration, integer, date/time) only.
- Always use strict criteria functionality and provide an explicit list of criteria.
- Ignore punctuation within searches.
- Consider adding other search capabilities according to project needs (e.g. use quotes to search for exact matches).

## Design

### Elements

![Filtered search elements](<../images/filtered-search-elements.png>)

> 1. Placeholder, 2. Container, 3. Search button, 4. Clear button

### Interaction states

The filtered search container color should always be in contrast with its surrounding background. Use `background-2` or `background-1` according to that.

![Filtered search states](<../images/filtered-search-states.png>)

### Filter anatomy

Filtered Search is used in combination with the Filter Pills. The filter can be composed of three different elements:

- **Key:** Targeted property or category.
- **Value:** Specific value of the property you are looking for.
- **Operator:** The intended relation between Key and Value (`=`, `>`, `<`, etc).

Combine the elements according to the complexity needed.

![Filter elements](<../images/filter-elements.png>)

### Filter patterns

#### Character value (string)

It allows to input text to find content without a predefined set of options.

![Filtered search free text](<../images/filtered-search-character.png>)

#### Numeric value (integer / float)

It allows to input numbers. Usually has an operator and allows range filtering.

![Filtered search free text](<../images/filtered-search-numeric.png>)

#### Enumeration

Enumeration contain a predefined set of values, from which the user can select one option (single selection) or many (multi-selection). Combine with a [typeahead behavior](<https://element.siemens.io/components/sorting-filtering/typeahead/>) so users can enter the search value.

![Filtered search enumeration](<../images/filtered-search-enumeration.png>)

If more than one value is selected, an item count shall be shown in the filter pill.

![Filtered search pills](<../images/filtered-search-pills.png>)

## Code

Assume you are searching for a person of a specific company and location. Company and location are criteria with possible options like Siemens, Maximago or Munich, Zug, etc. You can define possible search criteria by providing these criteria with the input `[criteria]` as one object. On pressing return, the `(doSearch)` output callback event will provide you with an object describing the selected criteria and the additional string, the user entered.

The `Criterion` type is used as input and output data type for this component. It always has a `name` and optionally a `label` that is used for displaying to the UI. As an input object, the `options` property is used to specify, which options the users can select as value for the criterion. These options can be an array of strings or an array of `OptionCriterion` which allows to specify a value for the label and different value for doing the search. When search is activated, the callback sets the selected option (the value itself or the `value` property if `OptionCriterion` is used) as value in the `Criterion` object.

For more advanced use cases, custom comparison operators (e.g. `>` or `!=`) can be used besides of the standard *equal* operator, while also restricting the input to match a certain data type (e.g. `string` or `integer`). See the [custom operators example](<https://element.siemens.io/components/sorting-filtering/filtered-search/#filtered-search-custom-operators>) for details.

By default, the user is allowed to enter additional criteria and criterion values than initially configured. Additional criteria can be created by adding a `:` after the written criteria (e.g. `additional:`).

Also good to know is that `Criterion values` are editable after they're created. So you don't have to drop the whole `Criterion`.

This component uses [CSS Variables](<https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables>) to make sizes and colors adjustable on the fly. Use the variable `--filtered-search-font-size` in combination with `--filtered-search-line-height` to adjust the size of the component.

### Usage

```
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';

@Component({
  imports: [SiFilteredSearchComponent, ...]
})
```

### Filtered search - Basic

The following provides a basic example with pre-configured criteria and their options. At a minimum, you must define the criteria. Other optional parameters to define are:

- `(doSearch)` output for handling when user submits search criteria
- `[placeholder]` input for placeholder (empty string by default)
- `[submitText]` input for configurable 'submit' text ('Apply search criteria' by default)

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject, viewChild } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-basic.html'
})
export class SampleComponent {
  readonly search = viewChild.required<SiFilteredSearchComponent>('search');
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;
  logEvent = inject(LOG_EVENT);
  clear(): void {
    this.search().deleteAllCriteria();
  }
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    #search
    placeholder="Search or filter"
    searchLabel="search"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [criteria]="[
      { name: 'company', label: 'SI_FILTERED_SEARCH.COMPANY', options: ['Foo', 'Bar'] },
      {
        name: 'location',
        label: 'SI_FILTERED_SEARCH.LOCATION',
        options: ['Lünen', 'Karlsruhe', 'Munich', 'Zug']
      },
      { name: 'Name' }
    ]"
    [disableFreeTextSearch]="disableFreeTextSearch"
    (doSearch)="logEvent($event)"
  />
  <button type="button" class="btn btn-secondary mt-5 mb-5" (click)="clear()"> Clear </button>
</app-filter-settings>
```

### Filtered search - Basic with predefined search criteria

This sample extends the first one by preselecting criteria.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-search-criteria.html'
})
export class SampleComponent {
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;
  logEvent = inject(LOG_EVENT);
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    searchLabel="search"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [disableFreeTextSearch]="disableFreeTextSearch"
    [criteria]="[
      { name: 'company', label: 'SI_FILTERED_SEARCH.COMPANY', options: ['Foo', 'Bar'] },
      {
        name: 'location',
        label: 'SI_FILTERED_SEARCH.LOCATION',
        options: ['Lünen', 'Karlsruhe', 'Munich', 'Zug']
      },
      {
        name: 'country',
        label: 'SI_FILTERED_SEARCH.COUNTRY',
        options: [
          { value: 'DE', label: 'SI_FILTERED_SEARCH.GERMANY' },
          { value: 'CH', label: 'SI_FILTERED_SEARCH.SWITZERLAND' }
        ]
      }
    ]"
    [searchCriteria]="{
      criteria: [
        { name: 'location', value: 'Munich' },
        { name: 'location', value: 'Hamburg' },
        { name: 'country', value: 'CH' }
      ],
      value: 'Max'
    }"
    (doSearch)="logEvent($event)"
  />
</app-filter-settings>
```

### Filtered search - Lazy loaded criteria values

In many cases, your application defines the criteria, but the values need to be loaded from a server. In this case you can provide an function that returns the possible criterion options as an Observable.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import {
  CriterionDefinition,
  OptionType,
  SiFilteredSearchComponent
} from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';
import { Observable, Subject } from 'rxjs';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-lazy-values.html'
})
export class SampleComponent {
  readonly logEvent = inject(LOG_EVENT);
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;

  readonly filteredSearch = {
    criteria: [
      {
        name: 'company',
        label: 'Company',
        options: [
          { value: 'company-1', label: 'Company 1' },
          { value: 'company-2', label: 'Company 2' }
        ]
      },
      {
        name: 'location',
        label: 'Location',
        options: ['Lünen', 'Karlsruhe', 'Munich', 'Zug']
      },
      {
        name: 'day',
        label: 'Day',
        options: ['Today', 'Tomorrow', 'The day after tomorrow']
      },
      {
        name: 'ABCDEFGHIJKLMNOPQR',
        label: 'Characters',
        options: [
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI'
        ]
      },
      {
        name: 'country',
        label: 'Country',
        options: [
          { value: 'DE', label: 'Germany' },
          { value: 'CH', label: 'Switzerland' }
        ]
      }
    ],
    lazyCriterionProvider: (typed: string): Observable<CriterionDefinition[]> => {
      const result = new Subject<CriterionDefinition[]>();
      const filteredCategories: CriterionDefinition[] = [];

      typed = typed ? typed.toLowerCase() : '';
      if (typed.length > 0) {
        this.filteredSearch.criteria.forEach(criterion => {
          if (criterion.label.toLocaleLowerCase().includes(typed)) {
            filteredCategories.push(criterion);
          }
        });
      }

      setTimeout(() => {
        // dummy timeout to simulate e.g. REST delay
        result.next(filteredCategories);
      }, 500);
      return result.asObservable();
    },
    lazyValueProvider: (
      categoryName: string,
      typedVal: string | string[]
    ): Observable<OptionType[]> => {
      const subject = new Subject<OptionType[]>();
      const filteredValues: OptionType[] = [];
      if (Array.isArray(typedVal)) {
        this.processTypedText(categoryName, '', filteredValues, true);
      } else {
        this.processTypedText(categoryName, typedVal, filteredValues, false);
      }

      setTimeout(() => {
        // dummy timeout to simulate e.g. REST delay
        subject.next(filteredValues);
      }, 500);

      return subject.asObservable();
    }
  };
  private processTypedText(
    categoryName: string,
    typed: string,
    filteredValues: OptionType[],
    showAll: boolean
  ): void {
    typed = typed ? typed.toLowerCase() : '';
    const criterion = this.filteredSearch.criteria.find(cat => cat.name === categoryName);
    criterion?.options.forEach(value => {
      if (typeof value !== 'string') {
        if (showAll || value.label.toLocaleLowerCase().includes(typed)) {
          filteredValues.push(value);
        }
      } else {
        if (showAll || value.toLocaleLowerCase().includes(typed)) {
          filteredValues.push(value);
        }
      }
    });
  }
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    searchLabel="search"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [disableFreeTextSearch]="disableFreeTextSearch"
    [doSearchOnInputChange]="true"
    [criteria]="[
      { name: 'company', label: 'Company' },
      { name: 'location', label: 'Location', multiSelect: true },
      { name: 'country', label: 'Country' }
    ]"
    [lazyValueProvider]="filteredSearch.lazyValueProvider"
    [searchCriteria]="{
      criteria: [
        { name: 'location', value: 'Munich' },
        { name: 'location', value: 'Hamburg' }
      ],
      value: ''
    }"
    (doSearch)="logEvent($event)"
  />
</app-filter-settings>
```

### Filtered search - Lazy loaded criteria and category values

In addition to lazy loaded value, you can also lazy load the criteria itself.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import {
  CriterionDefinition,
  SearchCriteria,
  SiFilteredSearchComponent
} from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';
import { Observable, Subject } from 'rxjs';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-lazy-criteria.html'
})
export class SampleComponent {
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;
  logEvent = inject(LOG_EVENT);
  public filteredSearch = {
    criteria: [
      {
        name: 'company',
        label: 'Company',
        options: ['Foo', 'Bar']
      },
      {
        name: 'location',
        label: 'Location',
        options: ['Lünen', 'Karlsruhe', 'Munich', 'Zug']
      },
      {
        name: 'day',
        label: 'Day',
        options: ['Today', 'Tomorrow', 'The day after tomorrow']
      },
      {
        name: 'ABCDEFGHIJKLMNOPQR',
        label: 'Characters',
        options: [
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI',
          'ABC',
          'DEF',
          'GHI'
        ]
      }
    ],
    lazyCriterionProvider: (
      typed: string,
      searchCriteria?: SearchCriteria
    ): Observable<CriterionDefinition[]> => {
      const result = new Subject<CriterionDefinition[]>();
      const filteredCategories: CriterionDefinition[] = [];

      typed = typed ? typed.toLowerCase() : '';
      if (typed.length > 0) {
        this.filteredSearch.criteria.forEach((criterion: CriterionDefinition) => {
          if (
            criterion.label?.toLocaleLowerCase().includes(typed) &&
            !searchCriteria?.criteria.some(element => element.name === criterion.name)
          ) {
            filteredCategories.push(criterion);
          }
        });
      }

      setTimeout(() => {
        // dummy timeout to simulate e.g. REST delay
        result.next(filteredCategories);
      }, 500);
      return result.asObservable();
    },
    lazyValueProvider: (categoryName: string, typed: string | string[]): Observable<string[]> => {
      const subject = new Subject<string[]>();

      const typedArray = typeof typed === 'string' ? [typed] : typed;

      const filteredValues: string[] = [];
      const criterion = this.filteredSearch.criteria.filter(cat => cat.name === categoryName)[0];
      if (criterion) {
        criterion.options.forEach(value => {
          if (typedArray.every(typedValue => value.toLocaleLowerCase().includes(typedValue))) {
            filteredValues.push(value);
          }
        });
      }
      setTimeout(() => {
        // dummy timeout to simulate e.g. REST delay
        subject.next(filteredValues);
      }, 500);

      return subject.asObservable();
    }
  };
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    searchLabel="search"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [disableFreeTextSearch]="disableFreeTextSearch"
    [lazyCriterionProvider]="filteredSearch.lazyCriterionProvider"
    [lazyValueProvider]="filteredSearch.lazyValueProvider"
    (doSearch)="logEvent($event)"
  />
</app-filter-settings>
```

### Filtered Search - Strict criteria

If you only allow the criteria defined, use `[strictCriterion]` to specify it.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-strict-criteria.html'
})
export class SampleComponent {
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;
  logEvent = inject(LOG_EVENT);
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    searchLabel="search"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [disableFreeTextSearch]="disableFreeTextSearch"
    [criteria]="[
      { name: 'company', label: 'SI_FILTERED_SEARCH.COMPANY', options: ['Foo', 'Bar'] },
      {
        name: 'location',
        label: 'SI_FILTERED_SEARCH.LOCATION',
        options: ['Lünen', 'Karlsruhe', 'Munich', 'Zug']
      }
    ]"
    [searchCriteria]="{
      criteria: [
        { name: 'location', value: 'Munich' },
        { name: 'locationX', value: 'Hamburg' }
      ],
      value: ''
    }"
    [strictCriterion]="true"
    (doSearch)="logEvent($event)"
  />
</app-filter-settings>
```

### Filtered search - Strict category values

If you only allow the criteria options defined, use `[strictValue]` to specify it.

`[strictValue]` enforces `[strictCriterion]` to true automatically.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-strict-values.html'
})
export class SampleComponent {
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;
  logEvent = inject(LOG_EVENT);
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    searchLabel="search"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [disableFreeTextSearch]="disableFreeTextSearch"
    [criteria]="[
      { name: 'company', label: 'SI_FILTERED_SEARCH.COMPANY', options: ['Foo', 'Bar'] },
      {
        name: 'location',
        label: 'SI_FILTERED_SEARCH.LOCATION',
        options: ['Lünen', 'Karlsruhe', 'Munich', 'Zug']
      }
    ]"
    [searchCriteria]="{
      criteria: [
        { name: 'location', value: 'Munich' },
        { name: 'location', value: 'Hamburg' },
        { name: 'locationQ', value: 'Hamburg' }
      ],
      value: ''
    }"
    [strictCriterion]="true"
    [strictValue]="true"
    (doSearch)="logEvent($event)"
  />
</app-filter-settings>
```

### Filtered search - Trigger search value input

`[doSearchOnInputChange]` filters not applied explicitly ("Apply search criteria") only but implicitly while typing or selecting the search criteria.

You can use `[searchDebounceTime]` to change the delay between the key stroke and the search emission.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-value-trigger-search.html'
})
export class SampleComponent {
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;
  logEvent = inject(LOG_EVENT);
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    placeholder="Search or filter"
    searchLabel="search"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [disableFreeTextSearch]="disableFreeTextSearch"
    [criteria]="[
      { name: 'company', label: 'SI_FILTERED_SEARCH.COMPANY', options: ['Foo', 'Bar'] },
      {
        name: 'location',
        label: 'SI_FILTERED_SEARCH.LOCATION',
        options: ['Lünen', 'Karlsruhe', 'Munich', 'Zug']
      },
      { name: 'Name' }
    ]"
    [doSearchOnInputChange]="true"
    [searchDebounceTime]="200"
    (doSearch)="logEvent($event)"
  />
</app-filter-settings>
```

### Filtered search - Custom operators

For more advanced use cases, the `Criterion` type also allows to specify custom comparison operators via the `operators` property. The operators are an array of strings like `!=`, `<`, `>`, etc. The selected operator is then saved in the `operator` property. To restrict the type of `value`, the `validationType` property can be set to any of these values: `string`, `integer`, or `float`. See the following example on how these properties can be used to filter for a certain temperature range:

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-operators.html'
})
export class SampleComponent {
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;
  logEvent = inject(LOG_EVENT);
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    searchLabel="label"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [disableFreeTextSearch]="disableFreeTextSearch"
    [criteria]="[
      { name: 'company', label: 'SI_FILTERED_SEARCH.COMPANY', options: ['Siemens', 'MAXIMAGO'] },
      {
        name: 'highLimit',
        label: 'SI_FILTERED_SEARCH.HIGHLIMIT',
        validationType: 'integer',
        operators: ['≠', '≤', '≥', '<', '>']
      },
      {
        name: 'country',
        label: 'SI_FILTERED_SEARCH.COUNTRY',
        options: [
          { value: 'DE', label: 'SI_FILTERED_SEARCH.GERMANY' },
          { value: 'CH', label: 'SI_FILTERED_SEARCH.SWITZERLAND' }
        ]
      }
    ]"
    [searchCriteria]="{
      criteria: [
        { name: 'highLimit', operator: '≤', value: '80' },
        { name: 'country', value: 'Switzerland' }
      ],
      value: 'Max'
    }"
    (doSearch)="logEvent($event)"
  />
</app-filter-settings>
```

### Filtered search - DatePicker

The following example shows the datepicker's use:

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-datetime.html'
})
export class SampleComponent {
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;
  minDate = new Date('2020-03-12');
  maxDate = new Date('2022-06-12');
  logEvent = inject(LOG_EVENT);
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    searchLabel="label"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [disableFreeTextSearch]="disableFreeTextSearch"
    [criteria]="[
      {
        name: 'Alarm',
        label: 'SI_FILTERED_SEARCH.ALARM',
        validationType: 'date-time',
        operators: ['=', '≤', '≥'],
        datepickerConfig: {
          showTime: true,
          todayText: 'Today',
          weekStartDay: 'monday',
          hideWeekNumbers: false,
          showMinutes: true,
          showSeconds: true,
          showMilliseconds: false,
          mandatoryTime: false,
          disabledTime: false,
          enabledTimeText: 'Consider time',
          disabledTimeText: 'Ignore time',
          minDate: minDate,
          maxDate: maxDate
        }
      },
      {
        name: 'Birthday',
        label: 'SI_FILTERED_SEARCH.BIRTHDAY',
        validationType: 'date',
        operators: ['=', '≤', '≥']
      },
      {
        name: 'location',
        label: 'SI_FILTERED_SEARCH.LOCATION',
        multiSelect: true,
        options: ['Lünen', 'Karlsruhe', 'Munich', 'Zug']
      }
    ]"
    [searchCriteria]="{
      criteria: [
        { name: 'Alarm', operator: '≥', value: '2020-08-28T14:30:25.000Z' },
        { name: 'Birthday', operator: '=', value: '1994-12-20' }
      ],
      value: 'Max'
    }"
    [doSearchOnInputChange]="false"
    (doSearch)="logEvent($event)"
  />
</app-filter-settings>
```

### Filtered search - Multi Select

The following example shows the use of multi select criterion:

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { BackgroundColorVariant } from '@siemens/element-ng/common';
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';
import { LOG_EVENT } from '@siemens/live-preview';

import { SiFilterSettingsComponent } from '../si-filter-settings/si-filter-settings.component';

@Component({
  selector: 'app-sample',
  imports: [SiFilterSettingsComponent, SiFilteredSearchComponent],
  templateUrl: './si-filtered-search-multiselect.html'
})
export class SampleComponent {
  variant: BackgroundColorVariant = 'base-1';
  disable = false;
  disableFreeTextSearch = false;
  logEvent = inject(LOG_EVENT);
}
```

Template:

```html
<app-filter-settings
  [(variant)]="variant"
  [(disabled)]="disable"
  [(disableFreeTextSearch)]="disableFreeTextSearch"
>
  <si-filtered-search
    searchLabel="label"
    clearButtonLabel="clear"
    [colorVariant]="variant"
    [disabled]="disable"
    [disableFreeTextSearch]="disableFreeTextSearch"
    [criteria]="[
      { name: 'company', label: 'SI_FILTERED_SEARCH.COMPANY', options: ['Foo', 'Bar'] },
      {
        name: 'location',
        label: 'SI_FILTERED_SEARCH.LOCATION',
        multiSelect: true,
        options: ['Lünen', 'Karlsruhe', 'Munich', 'Zug']
      },
      {
        name: 'country',
        label: 'SI_FILTERED_SEARCH.COUNTRY',
        options: [
          { value: 'DE', label: 'SI_FILTERED_SEARCH.GERMANY' },
          { value: 'CH', label: 'SI_FILTERED_SEARCH.SWITZERLAND' }
        ]
      }
    ]"
    [searchCriteria]="{
      criteria: [
        { name: 'location', value: ['Munich', 'Zug'] },
        { name: 'location', value: 'Hamburg' },
        { name: 'country', value: 'CH' }
      ],
      value: 'Max'
    }"
    (doSearch)="logEvent($event)"
    (searchCriteriaChange)="logEvent('searchCriteriaChange', $event)"
  />
</app-filter-settings>
```

### [SiFilteredSearchComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L83-L840>)

**Kind:** component

**Selector:** `si-filtered-search`

```
import { SiFilteredSearchComponent } from '@siemens/element-ng/filtered-search';
```

```
component SiFilteredSearchComponent implements OnInit, OnChanges
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [clearButtonLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L231-L231>) | `TranslatableString` | `` $localize`:@@SI_FILTERED_SEARCH.CLEAR:Clear` `` | Clear button aria label. Needed for a11y |
| [colorVariant](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L261-L261>) | `BackgroundColorVariant` | `'base-1'` | Color variant to determine component background |
| [criteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L189-L189>) | `CriterionDefinition[]` | `[]` | Predefine criteria options. |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L122-L122>) | `boolean` | `false` | Disable any interactivity. |
| [disableFreeTextSearch](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L267-L267>) | `boolean` | `false` | Disables the free text search to only use the criterion for filtering. |
| [disableSelectionByColonAndSemicolon](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L281-L281>) | `boolean` | `false` | By default, the Filtered Search will treat `:` as a special character to submit the current input in the freetext and immediately create a criterion. Use this input to disable this behavior. |
| [doSearchOnInputChange](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L102-L104>) | `boolean` | `false` | If this is set to `true`, the search triggers for each input (implicit search). By default, the search is triggered when the user submits by pressing the search button or by pressing enter. |
| [exclusiveCriteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L195-L197>) | `boolean` | `false` | Opt-in to search for each criterion only once. |
| [freeTextCriterion](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L293-L293>) | `CriterionDefinition \| undefined` |  | Criterion definition for free-text pills. When set, free-text values will be added as a pill with this criterion. If not set, free-text pills are disabled.<br><br>Enabling this will only emit valueChange events when the free-text pill is created. When the text input is blurred and there is text inside, a free-text pill will be created. |
| [itemCountText](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L253-L255>) | `TranslatableString` | `` $localize`:@@SI_FILTERED_SEARCH.ITEM_COUNT:{{itemCount}} selected` `` | Items count text appended to the count in case of multi-selection of values. Translation key, `{{itemCount}}` in the translation will be replaced with the actual value. |
| [lazyCriterionProvider](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L108-L109>) | `((typed: string, searchCriteria?: SearchCriteria) => Observable<CriterionDefinition[]>) \| undefined` |  | In addition to lazy loaded value, you can also lazy load the criteria itself |
| [lazyLoadingDebounceTime](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L151-L151>) | `number` | `500` | Custom debounce time for lazy loading of criteria data. |
| [lazyValueProvider](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L115-L116>) | `((criterionName: string, typed: string \| string[]) => Observable<OptionType[]>) \| undefined` |  | In many cases, your application defines the criteria, but the values need to be loaded from a server. In this case you can provide a function that returns the possible criterion options as an Observable. |
| [maxCriteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L206-L206>) | `number \| undefined` | `undefined` | Limit the number of possible criteria. The default is undefined so that any number of criteria can be used. For example, setting the value to 1 let you only select one criterion that you need to remove before being able to set another one. |
| [maxCriteriaOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L212-L212>) | `number` | `20` | Defines the maximum options within one criterion. The default is 20 and 0 means unlimited. |
| [onlySelectValue](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L144-L144>) | `boolean` | `false` | Limit criterion options to the predefined ones and prevent typing. `[onlySelectValue]` enforces `[strictValue]` and `[strictCriterion]` to true automatically. |
| [optionsInScrollableView](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L173-L173>) | `number` | `10` | Defines the number of criteria, criteria values and operators visible at once. |
| [placeholder](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L166-L166>) | `string` | `''` | The placeholder for input field. |
| [scrollStrategy](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L89-L89>) | `() => ScrollStrategy` | `defaultConnectedOverlayScrollStrategyFactory()` | Factory for CDK scroll strategies used by filtered-search overlays. |
| [searchCriteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L183-L183>) | `SearchCriteria` | `{ criteria: [], value: '' }` | The current selected search criteria and entered search text. |
| [searchDebounceTime](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L159-L159>) | `number` | `0` | Custom debounce time (in mills) to delay the search emission. (Default is 0 as in most cases a users manually triggers a search. Recommended to increase a bit when using doSearchOnInputChange=true) |
| [searchForFreeTextLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L306-L308>) | `TranslatableString` | `` $localize`:@@SI_FILTERED_SEARCH.SEARCH_FOR_FREE_TEXT:Search for "{{query}}"` `` | The value to be shown for creating free-text pills. Use the `{{query}}` placeholder to show the user input in the label. |
| [searchLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L221-L221>) | `TranslatableString` | `` $localize`:@@SI_FILTERED_SEARCH.SEARCH:Search…` `` | Search input aria label, Needed by a11y |
| [strictCriterion](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L128-L128>) | `boolean` | `false` | Limit criteria to the predefined ones. |
| [strictValue](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L136-L136>) | `boolean` | `false` | Limit criterion options to the predefined ones. `[strictValue]` enforces `[strictCriterion]` to true automatically. |
| [submitButtonLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L241-L243>) | `TranslatableString` | `` $localize`:@@SI_FILTERED_SEARCH.SUBMIT_BUTTON:Apply search criteria` `` | The accessible label of the search button. |
| [typeaheadOptionsLimit](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L273-L273>) | `number` | `20` | Limit on the number of criteria/criteria value to be displayed by the typeahead |

#### Output Properties

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead> <tbody><tr id="SiFilteredSearchComponent.doSearch"> <td class="api-column-name"><span data-api-type-target-for="SiFilteredSearchComponent.doSearch" id="t:SiFilteredSearchComponent.doSearch"></span><a href="https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L94-L94">doSearch</a></td> <td class="api-column-type"><code><a href="index.html#t:SearchCriteria">SearchCriteria</a></code></td> <td class="api-column-description"><p>Output callback event that provides an object describing the selected criteria and additional filter text.</p></td></tr><tr id="SiFilteredSearchComponent.interceptDisplayedCriteria"> <td class="api-column-name"><span data-api-type-target-for="SiFilteredSearchComponent.interceptDisplayedCriteria" id="t:SiFilteredSearchComponent.interceptDisplayedCriteria"></span><a href="https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L329-L329">interceptDisplayedCriteria</a></td> <td class="api-column-type"><code><a href="index.html#t:DisplayedCriteriaEventArgs">DisplayedCriteriaEventArgs</a></code></td> <td class="api-column-description"><p>The interceptor is called when the list of criteria is shown as soon as the user starts typing in the input field. The interceptor's <a href="index.html#t:DisplayedCriteriaEventArgs.allow">DisplayedCriteriaEventArgs.allow</a> method can be used to filter the list of displayed criteria.</p><p><strong>Note:</strong> The interceptor is called as long as the <a href="index.html#SiFilteredSearchComponent.searchCriteria">searchCriteria</a> does not exceed <a href="index.html#SiFilteredSearchComponent.maxCriteria">maxCriteria</a>. Further, the interceptor is not called when using the <a href="index.html#SiFilteredSearchComponent.lazyCriterionProvider">lazyCriterionProvider</a>.</p><p>Example:</p><pre><code>&lt;si-filtered-search&#10;  [criteria]=&quot;[{ name: 'foo', label: 'Foo' }, { name: 'bar', label: 'Bar' }]&quot;&#10;  (interceptDisplayedCriteria)=&quot;$event.allow(&#10;      $event.searchCriteria.criteria.some(s =&gt; s.name === 'foo')&#10;        ? $event.criteria.filter(c =&gt; c !== 'foo')&#10;        : $event.criteria&#10;    )&quot;&gt;&#10;&lt;/si-filtered-search&gt;</code></pre></td></tr><tr id="SiFilteredSearchComponent.searchCriteriaChange"> <td class="api-column-name"><a href="https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L183-L183">searchCriteriaChange</a></td> <td class="api-column-type"><code><a href="index.html#t:SearchCriteria">SearchCriteria</a></code></td> <td class="api-column-description"><p>The current selected search criteria and entered search text.</p></td></tr></tbody></table>

#### Attributes and Methods

##### deleteAllCriteria

[Source for deleteAllCriteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L527-L538>)

Deletes all currently selected criteria and effectively resets the filtered search.

```
deleteAllCriteria(event?: MouseEvent): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [event](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.component.ts#L527-L527>) (optional) | `MouseEvent` |  |  |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### Types Documentation

### [BackgroundColorVariant](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/color-variant.model.ts#L8-L8>)

**Kind:** type alias

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

Use this type with filter components `colorVariant` to render component variants based on background of container

```
type BackgroundColorVariant = 'base-1' | 'base-0'
```

### [CriterionDefinition](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L37-L77>)

**Kind:** interface

```
import type { CriterionDefinition } from '@siemens/element-ng/filtered-search';
```

A CriterionDefinition is the definition of criteria in the [SiFilteredSearchComponent](<index.html#SiFilteredSearchComponent>). It defines the type and based this further attributes like multiselect and available options.

```
interface CriterionDefinition
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [datepickerConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L61-L61>) (optional) | `Omit<DatepickerInputConfig, "enableDateRange" \| "enableTwoMonthDateRange">` | Optional configuration object for the datepicker. |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L45-L45>) (optional) | `TranslatableString` | An optional label, which is used in the user interface. |
| [multiSelect](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L76-L76>) (optional) | `boolean` | Defines whether multi selection of the options is possible in a typeahead. Setting it to `true` enables the checkbox besides the option values. When `multiSelect` is `true`, the value input field will be readonly, allowing user to select the values only from the typeahead. |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L41-L41>) | `string` | The mandatory name of a criterion. |
| [onlySelectValue](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L70-L70>) (optional) | `boolean` | Limit criterion options to the predefined ones and prevent typing. `onlySelectValue` enforces `strictValue` to true automatically. |
| [operators](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L53-L53>) (optional) | `string[]` | This provides possible operators that the user can select for this criterion. |
| [options](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L49-L49>) (optional) | `OptionType[]` | The options provide possible values that the user can select for this criterion. |
| [strictValue](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L65-L65>) (optional) | `boolean` | Limit criterion options to the predefined ones. |
| [validationType](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L57-L57>) (optional) | `ValidationType` | This provides the value type of the input field. |

### [OptionType](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L82-L82>)

**Kind:** type alias

```
import type { OptionType } from '@siemens/element-ng/filtered-search';
```

Type for options

```
type OptionType = string | OptionCriterion
```

### [SearchCriteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L112-L122>)

**Kind:** interface

```
import type { SearchCriteria } from '@siemens/element-ng/filtered-search';
```

On search, the filtered search component emits a SearchCriteria object. It consists of all user selected criteria and the free text input value.

```
interface SearchCriteria
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [criteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L117-L117>) | `CriterionValue[]` | The selected criteria of the filtered search. Each criteria has a name and a value. |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L121-L121>) | `string` | Additional unstructured free text, which the user entered in the search. |

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

### [DisplayedCriteriaEventArgs](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L127-L142>)

**Kind:** interface

```
import type { DisplayedCriteriaEventArgs } from '@siemens/element-ng/filtered-search';
```

Event allows to intercept and change the displayed criteria before shown in typeahead.

```
interface DisplayedCriteriaEventArgs
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [criteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L131-L131>) | `string[]` | List of criteria names to display in typeahead. |
| [searchCriteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L135-L135>) | `SearchCriteria` | Current search criteria. |

#### Methods

##### allow

[Source for allow](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L141-L141>)

Interceptor function allows to reduce the list of displayed criteria.

```
allow(criteriaNamesToDisplay: string[], freeText?: boolean): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [criteriaNamesToDisplay](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L141-L141>) | `string[]` |  | • list of criteria names to be displayed. |
| [freeText](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L141-L141>) (optional) | `boolean` |  | • indicates whether free text pills are allowed. |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### [CriterionValue](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L13-L30>)

**Kind:** interface

```
import type { CriterionValue } from '@siemens/element-ng/filtered-search';
```

A CriterionValue is the input/output value of the [SiFilteredSearchComponent](<index.html#SiFilteredSearchComponent>), containing the user input.

```
interface CriterionValue
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [dateValue](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L29-L29>) (optional) | `Date` | If the criterion was defined as date or date-time this field will contain the value das js Date. |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L17-L17>) | `string` | The mandatory name of a criterion. |
| [operator](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L21-L21>) (optional) | `string` | This property holds the selected or entered operator of the criterion. |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L27-L27>) (optional) | `string \| string[]` | The value property holds the selected or entered value/values of the criterion. The value can also be passed as an array of strings. When `multiSelect` is enabled, the items in the value array will be shown as selected values in value input and the typeahead. |

### [ValidationType](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L8-L8>)

**Kind:** type alias

```
import type { ValidationType } from '@siemens/element-ng/filtered-search';
```

```
type ValidationType = 'string' | 'integer' | 'float' | 'date' | 'date-time'
```

### [DatepickerInputConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L106-L121>)

**Kind:** interface

```
import type { DatepickerInputConfig } from '@siemens/element-ng/datepicker';
```

```
interface DatepickerInputConfig extends DatepickerConfig
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [dateFormat](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L120-L120>) (optional) | `string` | Similar to `dateTimeFormat`, but used when only a date is displayed (e.g. when `showTime === false` or `disabledTime === true`). Only numeric date formats are supported. |
| [dateTimeFormat](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L114-L114>) (optional) | `string` | A custom date/time format according the Angular date pipe (see [https://angular.dev/api/common/DatePipe](<https://angular.dev/api/common/DatePipe>)). Only numeric date formats are supported. The format is used to render the time of a date-time criterion. If not specified, `mediumTime` is used if the `showSeconds` flag is true, otherwise `shortTime` as default. For the date-only case, 'shortDate' is used. |
| [disabledTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L48-L48>) (optional, inherited) | `boolean` | Defines the time is disabled when visible. Will also be updated on user change. Default is `false`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [disabledTimeText](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L56-L56>) (optional, inherited) | `TranslatableString` | Text or translation key for the `disabled` disable time. Default is `Ignore time`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [enableDateRange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L68-L68>) (optional, inherited) | `boolean` | Options to turn on date range selection.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [enabledTimeText](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L52-L52>) (optional, inherited) | `TranslatableString` | Text or translation key for the `enabled` disable time. Default is `Consider time`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [enableTimeValidation](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L76-L76>) (optional, inherited) | `boolean` | Consider time with minDate and maxDate<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [enableTwoMonthDateRange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L72-L72>) (optional, inherited) | `boolean` | Option to use two months view for date range picking.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [endTimeLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L103-L103>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [hideLabels](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L86-L86>) (optional, inherited) | `boolean` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [hideWeekNumbers](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L23-L23>) (optional, inherited) | `boolean` | Configuration for hiding week numbers. Default is `false`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [hoursAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L88-L88>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [hoursLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L82-L82>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [hoursPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L93-L93>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [mandatoryTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L44-L44>) (optional, inherited) | `boolean` | Hides disable time switch in the timepicker part and includes mandatory the time in the picker.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [maxDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L64-L64>) (optional, inherited) | `Date` | Maximal (latest) selectable date.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [meridians](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L98-L98>) (optional, inherited) | `string[]` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [meridiansAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L100-L100>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [meridiansLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L99-L99>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [millisecondsAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L91-L91>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [millisecondsLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L85-L85>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [millisecondsPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L96-L96>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [minDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L60-L60>) (optional, inherited) | `Date` | Minimal (earliest) selectable date.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [minutesAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L89-L89>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [minutesLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L83-L83>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [minutesPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L94-L94>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [onlyMonthSelection](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L80-L80>) (optional, inherited) | `boolean` | Only month and year are selectable.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [secondsAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L90-L90>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [secondsLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L84-L84>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [secondsPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L95-L95>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [showMilliseconds](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L39-L39>) (optional, inherited) | `boolean` | Defines the timepicker milliseconds visibility . Default is `false`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [showMinutes](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L31-L31>) (optional, inherited) | `boolean` | Defines the timepicker minutes visibility. Default is `true`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [showSeconds](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L35-L35>) (optional, inherited) | `boolean` | Defines the timepicker seconds visibility . Default is `false`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [showTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L27-L27>) (optional, inherited) | `boolean` | Defines the timepicker visibility. Default is `false`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [startTimeLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L102-L102>) (optional, inherited) | `string` | Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [todayText](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L15-L15>) (optional, inherited) | `TranslatableString` | Text or translation key for today button title. Default is `Today`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |
| [weekStartDay](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L19-L19>) (optional, inherited) | `WeekStart` | Defines the starting day of the week. Default is `monday`.<br><br>Inherited from [DatepickerConfig](<index.html#t:DatepickerConfig>) |

### [OptionCriterion](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L88-L106>)

**Kind:** interface

```
import type { OptionCriterion } from '@siemens/element-ng/filtered-search';
```

It allows to specify a different value between the one which is rendered and the one which is used for the search.

```
interface OptionCriterion
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [iconClass](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L100-L100>) (optional) | `string` | The icon to be displayed besides value in the typeahead |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L92-L92>) (optional) | `TranslatableString` | The label to show |
| [selected](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L105-L105>) (optional) | `boolean` | Shows whether the option is selected in the multi-select dropdown |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L96-L96>) | `string` | The value to use on searching |

### [WeekStart](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L9-L9>)

**Kind:** type alias

```
import type { WeekStart } from '@siemens/element-ng/datepicker';
```

```
type WeekStart = 'monday' | 'saturday' | 'sunday' | undefined
```

### [DatepickerConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L11-L104>)

**Kind:** interface

```
import type { DatepickerConfig } from '@siemens/element-ng/datepicker';
```

```
interface DatepickerConfig
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [disabledTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L48-L48>) (optional) | `boolean` | Defines the time is disabled when visible. Will also be updated on user change. Default is `false`. |
| [disabledTimeText](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L56-L56>) (optional) | `TranslatableString` | Text or translation key for the `disabled` disable time. Default is `Ignore time`. |
| [enableDateRange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L68-L68>) (optional) | `boolean` | Options to turn on date range selection. |
| [enabledTimeText](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L52-L52>) (optional) | `TranslatableString` | Text or translation key for the `enabled` disable time. Default is `Consider time`. |
| [enableTimeValidation](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L76-L76>) (optional) | `boolean` | Consider time with minDate and maxDate |
| [enableTwoMonthDateRange](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L72-L72>) (optional) | `boolean` | Option to use two months view for date range picking. |
| [endTimeLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L103-L103>) (optional) | `string` |  |
| [hideLabels](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L86-L86>) (optional) | `boolean` |  |
| [hideWeekNumbers](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L23-L23>) (optional) | `boolean` | Configuration for hiding week numbers. Default is `false`. |
| [hoursAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L88-L88>) (optional) | `string` |  |
| [hoursLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L82-L82>) (optional) | `string` |  |
| [hoursPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L93-L93>) (optional) | `string` |  |
| [mandatoryTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L44-L44>) (optional) | `boolean` | Hides disable time switch in the timepicker part and includes mandatory the time in the picker. |
| [maxDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L64-L64>) (optional) | `Date` | Maximal (latest) selectable date. |
| [meridians](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L98-L98>) (optional) | `string[]` |  |
| [meridiansAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L100-L100>) (optional) | `string` |  |
| [meridiansLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L99-L99>) (optional) | `string` |  |
| [millisecondsAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L91-L91>) (optional) | `string` |  |
| [millisecondsLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L85-L85>) (optional) | `string` |  |
| [millisecondsPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L96-L96>) (optional) | `string` |  |
| [minDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L60-L60>) (optional) | `Date` | Minimal (earliest) selectable date. |
| [minutesAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L89-L89>) (optional) | `string` |  |
| [minutesLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L83-L83>) (optional) | `string` |  |
| [minutesPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L94-L94>) (optional) | `string` |  |
| [onlyMonthSelection](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L80-L80>) (optional) | `boolean` | Only month and year are selectable. |
| [secondsAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L90-L90>) (optional) | `string` |  |
| [secondsLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L84-L84>) (optional) | `string` |  |
| [secondsPlaceholder](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L95-L95>) (optional) | `string` |  |
| [showMilliseconds](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L39-L39>) (optional) | `boolean` | Defines the timepicker milliseconds visibility . Default is `false`. |
| [showMinutes](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L31-L31>) (optional) | `boolean` | Defines the timepicker minutes visibility. Default is `true`. |
| [showSeconds](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L35-L35>) (optional) | `boolean` | Defines the timepicker seconds visibility . Default is `false`. |
| [showTime](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L27-L27>) (optional) | `boolean` | Defines the timepicker visibility. Default is `false`. |
| [startTimeLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L102-L102>) (optional) | `string` |  |
| [todayText](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L15-L15>) (optional) | `TranslatableString` | Text or translation key for today button title. Default is `Today`. |
| [weekStartDay](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/si-datepicker.model.ts#L19-L19>) (optional) | `WeekStart` | Defines the starting day of the week. Default is `monday`. |
