Ui componentsCommon settings

Modal

Customize the modal component for Inkeep widgets.

InkeepModalSettings

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

PropertyTypeDescription
defaultViewAI_CHATSEARCH
forceInitialDefaultViewbooleanForce modal to open to the defaultView regardless of which view was last opened. Default false.
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,
};

On this page