anura-searchbar

<anura-searchbar></anura-searchbar>

Simple search input with optional siggestions (depends on the adapter)

Screenshot of <anura-searchbar>

Attributes

adapter

required: yes, live: no, default: -

With which adapter to talk to (for translations and suggestions)

suggest

required: no, live: on-change, default: true

Show suggested search terms (in a datalist) for auto-completion. Quality and availability depends on the adapter.

reset

required: no, live: yes, default: true

Whether to show a small "x" at the end to clear the input.

state

required: no, live: no, default: true

Whether to update the URL to persist the currently selected node (for sharing the link)

value

read-only

The value attribute is set by the component, as if it were a regular input field.

Events

change

standard change event

Fired when the user submits the search either by pressing the search button or by hitting enter.

Note that

Parts

<form part="searchbar-form">
    <input  part="searchbar-child searchbar-input">
    <button part="searchbar-child searchbar-button searchbar-reset"></button>
    <button part="searchbar-child searchbar-button searchbar-submit"></button>
</form>