Common Settings
Modal
Customize the modal component for Inkeep widgets.
InkeepModalSettings
This interface is used to configure the modal settings for the Inkeep widgets.
Property | Type | Description |
---|---|---|
defaultView | AI_CHAT | SEARCH | Default view for the modal. The default is AI_CHAT except for the InkeepSearchBar component. |
isModeSwitchingEnabled | boolean | Determines whether switching between search and chat in the modal is enabled. Default true . |
askAILabel | string | Text 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 . |
switchToSearchMessage | string | Text for the button that switches the modal to Search mode. Default is Search . |
openShortcutKey | string | Shortcut key for opening the modal. Default k for the InkeepSearchBar and InkeepCustomTrigger . Default / for InkeepChatButton . |
isShortcutKeyEnabled | boolean | Determines 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 . |
isAlignedToTop | boolean | Determines whether the modal is aligned to the top. Default true . |
isAlignedToRight | boolean | Determines 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,
};