Skip to content
Expanding header search, light
Light
Expanding header search, dark
Dark

Every state

  • Expanding header search, default, light
    Expanding header search, default, dark

    default

  • Expanding header search, hover, light
    Expanding header search, hover, dark

    hover

  • Expanding header search, focus, light
    Expanding header search, focus, dark

    focus

  • Expanding header search, expanded, light
    Expanding header search, expanded, dark

    expanded

  • Expanding header search, typed, light
    Expanding header search, typed, dark

    typed

  • Expanding header search, submit-focus, light
    Expanding header search, submit-focus, dark

    submit-focus

Props

PropTypeDefaultWhat it does
idstring"header-search"Id prefix; make it unique on the page.
labelstring"Search"Accessible name of the button and the field.
placeholderstring"Search the shop"Placeholder text.
actionstring"/search"Where the form goes on submit, with the text as `name`.
namestring"q"Form field name.
defaultQuerystring–Start open, with this text. Left out: closed.
defaultExpandedboolean–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`.
classNamestring–Extra classes on the outer element.

More search boxes

All 6
search-box-02 is in UI ProGet UI Pro, €199

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans