

Every state


default


focus


open


loading


no-results
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "shop-search" | Id prefix; make it unique on the page. |
| label | string | "Search the shop" | Accessible name of the field. |
| placeholder | string | "Search pans, pots, utensils…" | Placeholder text. |
| action | string | "/search" | Where the form goes on submit, with the text as `name`. |
| name | string | "q" | Form field name. |
| suggest | (query: string) => Promise<SearchBoxThumbnailsProduct[]> | async (query) => { await wait(300) const words = query.trim().toLowerCase().split(/\s+/) return PRODUCTS.filter((p) =… | Finds products for what was typed; the default searches a small local list after a short wait. |
| minChars | number | 2 | Typed characters before suggestions show. |
| defaultQuery | string | – | Starting text in the field. |
| onSelect | (product: SearchBoxThumbnailsProduct) => void | – | Called with the product when one is chosen. Left out: the browser goes to its href. |
| className | string | – | Extra classes on the outer element. |
More search boxes
All 6search-box-06 is in UI ProGet UI Pro, €199


