<SearchBox.Root />

The Search wrapper works as a provider and comes with some optional props that can come in handy.

import { SearchBox } from 'basehub/react-search'

// -> SearchBox.Root

Props

Key

Type

Description

search

UseSearchResult

Required. The search client generated with useSearch.

onHitSelect

(hit: Hit) => void

Optional callback triggered on any hit selection.

Examples

  • Documentation: Step by step

  • Also you can check out our search implementation for this Documentation template on Github