Search
Component
A built-in search component provides a seamless and fast search experience out of the box. Under the hood, it leverages the Pagefind package — a fully client-side search engine optimized for static sites. Pagefind indexes your content at build time and enables highly performant, zero-JavaScript-dependency searches at runtime.
Exported from nextra/components
.
Props
Name | Type | Default |
---|---|---|
emptyResult | ReactNode Not found text. | 'No results found.' |
errorText | ReactNode Error text. | 'Failed to load search index.' |
loading | ReactNode Loading text. | 'Loading…' |
placeholder | string Placeholder text. | 'Search documentation…' |
className | string CSS class name. | |
searchOptions | PagefindSearchOptions |