Integrate Pagefind UI components directly (Recommended)
mainFor Pagefind 1.5.0+, it is recommended to use Pagefind's native component-based UI instead of the Search.astro component. To ensure the Pagefind bundle path is wired correctly in Astro, you must include the PagefindConfig component on your page.
To implement a searchbox, import PagefindConfig and use the <pagefind-searchbox> web component.
---
import PagefindConfig from "astro-pagefind/components/PagefindConfig.astro";
---
<PagefindConfig />
<pagefind-searchbox></pagefind-searchbox>