InkeepModalSettings

This interface is used to configure the modal settings for the Inkeep widgets.

PropertyTypeDescription
defaultViewAI_CHAT | SEARCHDefault view for the modal. The default is AI_CHAT except for the InkeepSearchBar component.
isModeSwitchingEnabledbooleanDetermines whether switching between search and chat in the modal is enabled. Default true.
askAILabelstringText for the button that switches the modal to AI chat mode and for the Ask AI "<query>" card in the search results. Default is Ask AI.
switchToSearchMessagestringText for the button that switches the modal to Search mode. Default is Search.
openShortcutKeystringShortcut key for opening the modal. Default k for the InkeepSearchBar and InkeepCustomTrigger. Default / for InkeepChatButton.
isShortcutKeyEnabledbooleanDetermines whether hotkeys for opening the modal are enabled. Default true for the InkeepSearchBar, InkeepCustomTrigger, and the RECTANGLE_SHORTCUT variant of the InkeepChatButton.
onShortcutKeyPressed() => void Callback for when the shortcut key is pressed (only applies to InkeepCustomTrigger). Default undefined.
isAlignedToTopbooleanDetermines whether the modal is aligned to the top. Default true.
isAlignedToRightbooleanDetermines whether the modal is aligned to the right. Default false.

Example

import { type InkeepModalSettings } from "@inkeep/uikit";

export const modalSettings: InkeepModalSettings = {
  defaultView: "AI_CHAT",
  isModeSwitchingEnabled: true,
  openShortcutKey: "k",
  isShortcutKeyEnabled: true,
  onShortcutKeyPressed: undefined,
  isAlignedToTop: true,
  isAlignedToRight: false,
  closeOnBlur: true,
};