IntegrationsNextjs

Add Search Bar to Next.js

Integrate Inkeep's search bar into your Next.js application for powerful content discovery.

What is Next.js

Next.js is a React full-stack app development framework. You can use Inkeep's React component library to Add AI Search & Chat functionality to apps or documentation and marketing sites built with Next.js.

Get an API key

Follow these steps to create an API key for your web integration.

Copy and add the apiKey to your environment variables:

.env
NEXT_PUBLIC_INKEEP_API_KEY="INKEEP_API_KEY"

Install the component library

npm install @inkeep/cxkit-react
yarn add @inkeep/cxkit-react

Customize your settings

Define your Inkeep settings.

Define the component

Next, create an InkeepSearchBar.tsx component file for our Search Bar component.

Note
Note

For Next.js apps that use App Router, use the "use client" directive at the top of the file to load the widget client side.

For a full list of customizations, check out the Search Bar documentation.

On this page