
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
next-static-search
Advanced tools
A lightweight, zero-config search solution for Next.js static sites, built on top of Pagefind. Easily integrate full-text, client-side search into your statically generated Next.js website without relying on external services.
npm i next-static-search
yarn add next-static-search
pnpm i next-static-search
bun add next-static-search
Access Demo at: Demo
Install pagefind as a dev dependency:
npm i pagefind --save-dev
yarn add pagefind -D
pnpm i pagefind --save-dev
bun add pagefind --save-dev
Add following command to your package.json as next-static-search rely on files generated by pagefind.
// package.json
{
// ...
"scripts": {
"postbuild": "pagefind --site .next --output-path .next/static/pagefind"
}
// ...
}
Import the component where you want this search:
import { NextStaticSearch } from "next-static-search";
import "./globals.css";
import "next-static-search/dist/index.css";
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode,
}>) {
return (
<html lang="en">
<body>
<header>
<NextStaticSearch />
</header>
{children}
</body>
</html>
);
}
interface INextStaticSearch {
placeholder?: string;
searchClassName?: string;
macSymbol?: React.JSX.Element | string;
windowsSymbol?: React.JSX.Element | string;
searchBoxTitle?: string;
errorMessage?: string;
notFoundMessage?: string;
searchBoxType: "modal" | "inline";
}
Developed with ❤️ by Farasat Ali Feedback and contributions welcome!
FAQs
A powerful react search based on pagefind with beautiful UI
The npm package next-static-search receives a total of 4 weekly downloads. As such, next-static-search popularity was classified as not popular.
We found that next-static-search demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.