IntegrationsNextra

Add Custom Modal Trigger to Nextra

Integrate Inkeep's custom modal trigger into your Nextra documentation for flexible user interactions.

What is Nextra

Nextra is a framework for creating content-focused websites using Next.js and markdown.

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

We'll use the Modal Search and Chat component to create a custom trigger.

Create a ModalSearchAndChat.tsx file for our Custom Modal Trigger component. <button> represents whatever UI element you'd like to use to trigger the Inkeep Modal.

Use the component

Add a widget component to the page:

import InkeepModalSearchAndChat from "@/components/InkeepModalSearchAndChat";
 
export default function MyApp() {
  return (
    <>
      <InkeepModalSearchAndChat />
    </>
  );
}

For a full list of customizations, check out the Custom Modal Trigger documentation.

On this page