

Every state


default


hover


focus


expanded


typed


submit-focus
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "header-search" | Id prefix; make it unique on the page. |
| label | string | "Search" | Accessible name of the button and 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. |
| defaultQuery | string | – | Start open, with this text. Left out: closed. |
| defaultExpanded | boolean | – | Start open (a results page that shows what was searched). |
| onSearch | (term: string) => void | – | Called with the text on submit. Left out: the form submits to `action`. |
| className | string | – | Extra classes on the outer element. |
More search boxes
All 6search-box-02 is in UI ProGet UI Pro, €199


