The chat button is a great way to add an AI copilot to your landing page, dashboard, or documentation without changing your current search experience.

Quick start

Add the below <script> tag to the <head> or <body> of your website.

<!-- Add Inkeep widget -->

Replace <version> with the latest version of the Inkeep JS Snippet. Visit to see the latest version of the JS library in the URL.

Insert the Chat Button by using the Inkeep.embed() function.

<script type="module" defer>
  const inkeepWidget = Inkeep().embed({
    componentType: "ChatButton", // required
    targetElement: document.getElementById("inkeep-placeholder"), // required
    stylesheetUrls: ['/path/to/stylesheets'], // optional
    properties: {
      chatButtonType: 'ICON_TEXT_SHORTCUT', // default. Alternatives are 'ICON_TEXT' and 'ICON'
      baseSettings: {
        apiKey: process.env.INKEEP_INTEGRATION_API_KEY!, // required
        integrationId: process.env.INKEEP_INTEGRATION_ID!, // required
        organizationId: process.env.INKEEP_ORGANIZATION_ID!, // required
        organizationDisplayName: "Inkeep",
        primaryBrandColor: "#522FC9",
        //... optional base settings
      modalSettings: {
        // optional InkeepModalSettings
      searchSettings: {
        // optional InkeepSearchSettings
      aiChatSettings: {
        // optional InkeepAIChatSettings

Inkeep.Embed() for Chat Button

componentTypestringRequired. Must be ChatButton to add the ChatButton component.
targetElementHTMLElementRequired. A valid HTML element where you want to render the ChatButton component.
propertiesInkeepChatButtonPropsRequired. An object that contains the base settings and other optional settings for the ChatButton


This type represents the configuration for the Inkeep Chat Button widget.


All properties are optional.

chatButtonTypeChatButtonTypesType of the chat button. Can be ICON_TEXT_SHORTCUT, ICON_TEXT, or ICON. Default value ICON_TEXT_SHORTCUT.
isPositionFixedbooleanDetermines whether the position of the chat button is fixed. Default value true.
fixedPositionXOffsetstringX offset for the fixed position of the chat button. Default value 1.5rem
fixedPositionYOffsetstringY offset for the fixed position of the chat button. Default value 1.5rem.
stylesheetUrlsstring[]Optional. An array of strings. The strings must be valid absolute or relative URLs to CSS files.
baseSettingsInkeepWidgetBaseSettingsRequired. Base settings for any Inkeep widget. See reference here.
modalSettingsInkeepModalSettingsSettings for the modal. See reference here.
searchSettingsInkeepSearchSettingsAdditional search settings for the Inkeep widget. See reference here.
aiChatSettingsInkeepAIChatSettingsAI chat settings for the Inkeep widget. See reference here.


There are three variations of the chat button. The default is ICON_TEXT_SHORTCUT.


import type {
} from "@inkeep/widgets";
import baseSettings from "./baseSettings"; // your base settings typeof InkeepWidgetBaseSettings

const inkeepChatButtonSettings: InkeepChatButtonSettings = {
    chatButtonType: "ICON_TEXT",
    isPositionFixed: true,
    fixedPositionXOffset: "1.5rem",
    fixedPositionYOffset: "1.5rem",
    baseSettings : {
        //... typeof InkeepWidgetBaseSettings
    modalSettings : {
        //... typeof InkeepModalSettings
    searchSettings : {
        //... typeof InkeepSearchSettings
    aiChatSettings : {
        //... typeof InkeepAIChatSettings

Multiple components

You may want to add mutliple Inkeep widgets in your landing page. In such case, you can create a common Inkeep object with the same base settings for every widget.

const inkeepBase = Inkeep({
  integrationId: envConfig.INTEGRATION_ID || "", // required
  apiKey: envConfig.API_KEY || "", // required
  organizationId: envConfig.ORGANIZATION_ID || "", // required
  organizationDisplayName: "Inkeep",
  primaryBrandColor: "black",
  userId: "", // if you'd like analytics by user ID, like in cases where the user is authenticated or you have your own analytics platform
  userEmail: "",
  userName: "Inkeep",
  optOutAllAnalytics: false,
  optOutAnalyticalCookies: false,
  optOutFunctionalCookies: false,

You can then use inkeepBase.embed() to add different components with the same base settings.

Changing props after initial render

Inkeep comes with the feature to change the props of a widget after it is initially rendered. you can use the render method to update an instance of the component with any new properties.

This allows you want to change the color of the widget in the dark mode.

colorModeToggle.addEventListener("change", (e) => {
  // whatever logic you use to track the color mode
  const newColorMode =;

    baseSettings: {
      theme: {
        colorMode: {
          forcedColorMode: colorMode === "dark" ? "dark" : "light",

colorMode property changes the color of the widget depending upon the current color theme.