Skip to content
Suggestions with thumbnails, light
Light
Suggestions with thumbnails, dark
Dark

Every state

  • Suggestions with thumbnails, default, light
    Suggestions with thumbnails, default, dark

    default

  • Suggestions with thumbnails, focus, light
    Suggestions with thumbnails, focus, dark

    focus

  • Suggestions with thumbnails, open, light
    Suggestions with thumbnails, open, dark

    open

  • Suggestions with thumbnails, loading, light
    Suggestions with thumbnails, loading, dark

    loading

  • Suggestions with thumbnails, no-results, light
    Suggestions with thumbnails, no-results, dark

    no-results

Props

PropTypeDefaultWhat it does
idstring"shop-search"Id prefix; make it unique on the page.
labelstring"Search the shop"Accessible name of the field.
placeholderstring"Search pans, pots, utensils…"Placeholder text.
actionstring"/search"Where the form goes on submit, with the text as `name`.
namestring"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.
minCharsnumber2Typed characters before suggestions show.
defaultQuerystring–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.
classNamestring–Extra classes on the outer element.

More search boxes

All 6
search-box-06 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