next-static-search

← Back to the demo

Configuration

Every option is optional. The search box renders as a modal by default; set searchBoxType to inline to render results directly beneath the input instead.

tsx
<NextStaticSearch  searchBoxType="inline"  placeholder="Search the docs"  pagesToIgnore={["404", "500"]}  pagefindPath="/docs/_next/static/pagefind/pagefind.js"/>

Use pagefindPath whenever the site is served under a base path, such as a project site on GitHub Pages.