Skip to content

SiSearchBarComponent documentation

import { SiSearchBarComponent } from '@siemens/element-ng/search-bar';

Input Properties

Name Type Default Description
clearButtonAriaLabel
TranslatableString $localize`:@@SI_SEARCH_BAR.CLEAR_BUTTON:Clear`

Aria label for the clear button.

colorVariant
BackgroundColorVariant 'base-1'

Color to use for component background

debounceTime deprecated
number 400

Time unit change of search input takes effect.

Deprecated: Use a content-projected input and debounce its form value changes in application code, for example with RxJS debounceTime on FormControl.valueChanges:

<si-search-bar>
  <input siSearchBarInput [formControl]="searchControl">
</si-search-bar>
searchControl.valueChanges.pipe(debounceTime(400));
disabled deprecated
boolean false

Whether the input is disabled.

Deprecated: Use a content-projected input with disabled applied directly to it:

<si-search-bar>
  <input siSearchBarInput disabled>
</si-search-bar>
maxlength deprecated
number undefined

Defines the maximum length of the search input.

Deprecated: Use a content-projected input with maxlength applied directly to it:

<si-search-bar>
  <input siSearchBarInput maxlength="100">
</si-search-bar>
placeholder deprecated
string ''

Define search input placeholder.

Deprecated: Use a content-projected input with placeholder applied directly to it:

<si-search-bar>
  <input siSearchBarInput placeholder="Search">
</si-search-bar>
prohibitedCharacters deprecated
string | undefined

Prohibited characters restricting search.

Deprecated: Use a reactive FormControl or Signal Forms on a content-projected input to validate prohibited characters:

<si-search-bar>
  <input siSearchBarInput [formControl]="searchControl">
</si-search-bar>

Or with Signal Forms:

<si-search-bar>
  <input siSearchBarInput [formField]="searchForm.search">
</si-search-bar>
readonly deprecated
boolean false

Whether the input can be focused but not edited.

Deprecated: Use a content-projected input with readonly applied directly to it:

<si-search-bar>
  <input siSearchBarInput readonly>
</si-search-bar>
showIcon
boolean false

Display search icon before search input.

value deprecated
string | undefined

Define search input content.

Deprecated: Use a content-projected input with value applied directly to it:

<si-search-bar>
  <input siSearchBarInput value="Search term">
</si-search-bar>

Output Properties

Name Type Description
searchChange deprecated
string

Output callback event will provide you with search term if search input changes.

Deprecated: Use a content-projected input and observe FormControl.valueChanges or the field value signal with Signal Forms:

<si-search-bar>
  <input siSearchBarInput [formControl]="searchControl">
</si-search-bar>

Or with Signal Forms:

<si-search-bar>
  <input siSearchBarInput [formField]="searchForm.search">
</si-search-bar>

Types Documentation

BackgroundColorVariant

'base-1' | 'base-0'
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

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.


Except where otherwise noted, content on this site is licensed under MIT License.