Portal Community

The Shipped Default

Passing defaultChatSettings as-is gives a fully working, zero-config chat window:

export const defaultChatSettings: HilChatWindowSettings = {
  actionBar: { presetClickBehavior: 'send' },
  visibility: { header: true, timestamps: true, avatars: true, presetRow: true, actionBar: true },
  mount: { mode: 'overlay' },
  windowControls: { fullscreen: false, dock: false, minimize: false, close: true },
};

To customize, spread it and override just the fields you need:

<HilChatWindow settings={{ ...defaultChatSettings, visibility: { ...defaultChatSettings.visibility, avatars: false } }} />

Field Reference

FieldTypeWhat it controls
messageFilter(message) => booleanWhich messages this instance renders at all. Return false to hide a message entirely. Default: render everything.
renderers{ text?, form? }Per-message-kind renderer override. See Custom Renderers.
actionBar.defaultActionsarrayExtra action buttons always shown, in addition to whatever the current request itself provides.
actionBar.presetClickBehavior'send' | 'fill'Clicking a quick-reply chip either sends it immediately ('send', the default) or fills the text box for the person to edit before sending ('fill').
api.formFetchURLstringEndpoint the chat window's built-in inline-form renderer uses to fetch a form's schema by ID, when your app hasn't already registered its own form renderer (see Quick Start step 5).
api.authTokenProvider() => string | nullSupplies the auth token used for that fallback fetch, instead of the window reading it from a fixed storage location itself. Lets each app decide where its own token lives.
visibility.headerbooleanShow/hide the title bar (title, countdown, window controls) entirely.
visibility.timestampsbooleanReserved toggle for message timestamps — present in the settings shape, not yet rendered by the shipped bubble in this release.
visibility.avatarsbooleanShow/hide the sender initial (S/U) beside each bubble.
visibility.presetRowbooleanShow/hide the quick-reply chip row above the text box.
visibility.actionBarbooleanShow/hide the action-button row below the composer.
themeRecord<string, string>CSS custom-property overrides applied on top of the window's default theme. See Mount Modes & Theming.
mount.mode'overlay' | 'docked' | 'inline'Where and how the window renders. Default: 'overlay'. See Mount Modes & Theming.
mount.attachTostring (CSS selector) or elementRequired when mount.mode is 'docked' — the container the window portals into.
windowControls.fullscreenbooleanShow/hide the fullscreen icon in the header.
windowControls.dockbooleanShow/hide the dock icon in the header.
windowControls.minimizebooleanShow/hide the minimize icon in the header.
windowControls.closebooleanShow/hide the close icon. Requires an onClose prop on HilChatWindow to actually be clickable — otherwise it renders disabled.
Icon visibility vs. behavior The fullscreen, dock, and minimize window-control flags currently only control whether the icon is shown — clicking them does nothing yet, since no behavior has been wired up for them in this release. Only close is functional, and only once you supply an onClose handler.

Message Filtering Example

Hide form-kind messages entirely for an app that doesn't support rendering inline forms yet:

const settings: HilChatWindowSettings = {
  ...defaultChatSettings,
  messageFilter: (message) => message.kind !== 'form',
};

Supplying a Form Endpoint Example

const settings: HilChatWindowSettings = {
  ...defaultChatSettings,
  api: {
    formFetchURL: `${apiConfig.baseUrl}/api/v1/atlas/forms/by-id`,
    authTokenProvider: () => myAuthStore.getToken(),
  },
};