

Every state


default


focus


active


removed


typed


no-recent
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "site-search" | Id prefix; make it unique on the page. |
| label | string | "Search the shop" | Accessible name of the field. |
| placeholder | string | "Search the shop" | Placeholder text. |
| action | string | "/search" | Where the form goes on submit, with the text as `name`. |
| name | string | "q" | Form field name. |
| recent | string[] | ["cast-iron skillet", "oven gloves", "knife sharpener", "bread tin"] | Your recent searches, newest first. Empty: the group is left out. |
| recentHeading | string | "Recent searches" | Recent heading. |
| popular | string[] | ["dutch oven", "carbon-steel pan", "chef's knife", "linen tea towels", "stoneware mugs"] | Searches many people make, most first. Empty: the group is left out. |
| popularHeading | string | "Popular right now" | Popular heading. |
| onRemove | (term: string) => void | – | Called with a recent search when it is removed. |
| onSearch | (term: string) => void | – | Called with the text when a search is chosen or submitted. Left out: the form submits to `action`. |
| className | string | – | Extra classes on the outer element. |
More search boxes
All 6search-box-04 is in UI ProGet UI Pro, €199

