The following entity is available under an experimental flag and its API and behavior are subject to change.
A ui5-search
is an input with suggestions, used for user search.
The ui5-search
consists of several elements parts:
Scope - displays a select in the beggining of the component, used for filtering results by their scope.
Input field - for user input value
Clear button - gives the possibility for deleting the entered value
Search button - a primary button for performing search, when the user has entered a search term
Suggestions - a list with available search suggestions
ES6 Module Import​
import "@ui5/webcomponents-fiori/dist/Search.js";
Basic Sample​
A Search component with enabled scope and items and filtering by scope.
Download Open in Playground Edit
Properties​
loading​
Description Indicates whether a loading indicator should be shown in the popup. Type boolean
Default false
noTypeahead​
Description Defines whether the value will be autcompleted to match an item. Type boolean
Default false
Description Indicates whether the items picker is open. Type boolean
Default false
showClearIcon​
Description Defines whether the clear icon of the search will be shown. Type boolean
Default false
Description Defines the value of the component.Note: The property is updated upon typing. Type string
Default ""
placeholder​
Description Defines a short hint intended to aid the user with data entry when the component has no value. Type string | undefined
Default undefined
accessibleName​
Description Defines the accessible ARIA name of the component. Type string | undefined
Default undefined
accessibleDescription​
Description Defines the accessible ARIA description of the field. Type string | undefined
Default undefined
default​
Description Defines the Search suggestion items. Type Array<SearchItem | SearchItemGroup>
Description Defines the popup footer action button. Type Array<Button>
illustration​
Description Defines the illustrated message to be shown in the popup. Type Array<IllustratedMessage>
messageArea​
Description Defines the illustrated message to be shown in the popup. Type Array<SearchMessageArea>
Description Defines the component scope options. Type Array<ISearchScope>
Description Defines the filter button slot, used to display an additional filtering button. This slot is intended for passing a ui5-button
with a filter icon to provide extended filtering options.Note: Scope button and Filter button are mutually exclusive. Type Array<Button>
Since 2.11.0
Description Fired when the popup is opened. Type CustomEvent
Bubbles No Cancelable No
Description Fired when the popup is closed. Type CustomEvent
Bubbles No Cancelable No
Description Fired when typing in input or clear icon is pressed. Type CustomEvent
Bubbles Yes Cancelable No
scope-change​
Description Fired when the scope has changed. Type CustomEvent<SearchFieldScopeSelectionChangeDetails>
Parameters scope : HTMLElement
The newly selected scopeBubbles Yes Cancelable No
Description Fired when the user has triggered search with Enter key or Search Button press. Type CustomEvent
Bubbles Yes Cancelable Yes - via preventDefault()
Methods​
No methods available for this component.
CSS Parts​
No CSS parts available for this component.
More Samples​
Filtering​
The examples show the search message area, the search action, filtering per user input, typeahead and highlighting suggestions per user input.
Download Open in Playground Edit
This example shows how to use a custom advanced filtering button via the filterButton
slot.
Download Open in Playground Edit
Byline items​
The example shows how to display byline items with an image and description.
Download Open in Playground Edit
Show More Item​
This example shows how to use a Show More Item.
Download Open in Playground Edit