Integrations

Widget Configuration

Configure the Hissuno widget appearance, triggers, display modes, theme, and keyboard shortcuts.

Basic Configuration

Every widget instance requires a projectId. All other props are optional. When fetchDefaults is enabled (the default), the widget fetches your project's saved settings from the Hissuno API. Props you pass explicitly always override fetched defaults.

<HissunoWidget
  projectId="your-project-id"
  title="Help Center"
  placeholder="Describe your issue..."
  initialMessage="Welcome! Ask me anything about our product."
  theme="auto"
/>

All Configuration Options

Required

PropTypeDescription
projectIdstringYour project ID from the Hissuno dashboard

Trigger, Display, and Content

PropTypeDefaultDescription
trigger'bubble' | 'drawer-badge' | 'headless''bubble'What activates the widget
display'popup' | 'sidepanel' | 'dialog''sidepanel'How the chat UI appears
shortcutstring | false'mod+k'Keyboard shortcut to toggle
titlestring'Support'Chat window header title
placeholderstring'Ask a question or report an issue...'Input placeholder
initialMessagestring'Hi! How can I help you today?'First assistant message
defaultOpenbooleanfalseOpen the chat panel on mount
theme'light' | 'dark' | 'auto''light'Color theme
classNamestring--Additional CSS class on the root

Position and Sizing

PropTypeDefaultApplies to
bubblePosition'bottom-right' | 'bottom-left' | 'top-right' | 'top-left''bottom-right'trigger='bubble'
bubbleOffset{ x?: number, y?: number }{ x: 20, y: 20 }trigger='bubble'
drawerBadgeLabelstring'Support'trigger='drawer-badge'
drawerBadgeInitialYnumber50trigger='drawer-badge'
dialogWidthnumber600display='dialog'
dialogHeightnumber500display='dialog'

User, Auth, and Advanced

PropTypeDefaultDescription
userIdstring--End-user identifier for session tracking
userMetadataRecord<string, string>--Additional user info (name, email, plan)
widgetTokenstring--JWT for authenticated sessions
apiUrlstring'/api/integrations/widget/chat'Custom API endpoint
fetchDefaultsbooleantrueFetch settings from server on mount
headersRecord<string, string>{}Custom headers sent with every request

Trigger Types

Bubble (default)

A 56x56px floating circle button positioned at the specified corner:

<HissunoWidget projectId="..." trigger="bubble" bubblePosition="bottom-left" bubbleOffset={{ x: 24, y: 24 }} />

Drawer Badge

A vertical tab fixed to the right edge. Users can drag it vertically; position persists in localStorage:

<HissunoWidget projectId="..." trigger="drawer-badge" drawerBadgeLabel="Need help?" />

Headless

No built-in trigger. Provide your own via renderTrigger or use the useHissunoChat hook directly:

<HissunoWidget
  projectId="..."
  trigger="headless"
  renderTrigger={({ toggle, isOpen }) => (
    <button onClick={toggle}>{isOpen ? 'Close' : 'Help'}</button>
  )}
/>

Display Modes

  • sidepanel -- Full-height drawer from the right (400px wide).
  • popup -- Compact floating modal (380x520px) near the trigger.
  • dialog -- Centered modal with a blurred backdrop overlay.
<HissunoWidget projectId="..." display="dialog" dialogWidth={700} dialogHeight={550} />

Theme

The widget supports 'light', 'dark', and 'auto'. When set to 'auto', it follows the user's OS preference via prefers-color-scheme and updates in real time.

<HissunoWidget projectId="..." theme="auto" />

Keyboard Shortcuts

The shortcut prop accepts a key combination string. The modifier mod maps to Cmd on macOS and Ctrl on Windows/Linux. Supported modifiers: mod, ctrl, cmd, meta, alt, option, shift.

<HissunoWidget projectId="..." shortcut="ctrl+shift+h" />
<HissunoWidget projectId="..." shortcut={false} /> {/* disable */}

Callbacks

PropTypeDescription
onOpen() => voidCalled when the chat panel opens
onClose() => voidCalled when the chat panel closes
onControlsReady(controls: { setInput: (v: string) => void }) => voidExposes controls for external use
renderTrigger(props: TriggerRenderProps) => ReactNodeCustom trigger render function