<tap-searchbar>
Mobile search bar component. Features animated cancel button on focus and smooth interaction with <tap-page>.
Example
Loading...
<tap-searchbar .placeholder=${"Search apps or content..."}></tap-searchbar> <tap-searchbar .placeholder=${"Pre-filled query"} .value=${"TapUI"}></tap-searchbar> <tap-searchbar .placeholder=${"Disabled search bar"} .disabled=${true}></tap-searchbar>
API
Shadow DOM; Extends GemElement
Instance Properties
| Property(Attribute) | Reactive | Type |
|---|---|---|
value(value) |
Yes | string |
placeholder(placeholder) |
Yes | string |
cancelText(cancel-text) |
Yes | string |
autofocus(autofocus) |
Yes | boolean |
disabled(disabled) |
Yes | boolean |
disableCancel(disable-cancel) |
Yes | boolean |
change |
Emitter<string> |
|
search |
Emitter<string> |
|
submit |
Emitter<string> |
|
cancel |
Emitter |
|
focus |
(options?: FocusOptions) => void | undefined |
|
blur |
() => void | undefined |
Other
| Type | Value |
|---|---|
| Event | change, search, submit, cancel |
| Part | input, cancel |
| CSS State | fullscreen |
