widget/Widget Customization

Widget Customization

The Intufind chat widget is highly customizable to match your brand and user experience requirements. This guide covers all configuration options available.

Widget Position

Control where the widget appears on your site using the widgetPosition option:

PositionDescription
bottom-rightBottom right corner (default)
bottom-leftBottom left corner
top-rightTop right corner
top-leftTop left corner

Resizable Widget

Enable users to resize the chat window:

IntufindChatbot.configure({
  enableResize: true
});

When enabled, users can drag the corner of the chat window to resize it. The widget respects minimum and maximum dimensions defined in the theme.

Header Configuration

Customize the chat header to match your brand:

Widget header configuration Customize the header with your avatar, title, and subtitle

OptionDescriptionDefault
titleMain header title"AI Assistant"
subtitleSubtext below title"Here to help"
avatarURL to avatar imageDefault icon
headerAvatarShowBackgroundShow background behind avatartrue
headerAvatarShowBorderShow border around avatartrue
IntufindChatbot.configure({
  title: "Shop Assistant",
  subtitle: "Powered by AI",
  avatar: "/path/to/avatar.png",
  headerAvatarShowBackground: true,
  headerAvatarShowBorder: true
});

Trigger Button

The floating button that opens the chat can be fully customized:

Trigger button options Customize the trigger button appearance

OptionDescriptionDefault
triggerAvatarCustom image for trigger buttonChat icon
triggerShowBackgroundShow background circletrue
triggerIconShowBorderShow border around icontrue
IntufindChatbot.configure({
  triggerAvatar: "/path/to/icon.png",
  triggerShowBackground: true,
  triggerIconShowBorder: false
});

Greeting & Empty State

Configure what visitors see when they first open the chat:

OptionDescriptionExample
greetingMain greeting text"How can I help you today?"
greetingSubtextSecondary text"Ask me anything about our products"
greetingIconCustom icon for empty stateURL or null for default
IntufindChatbot.configure({
  greeting: "Welcome! How can I assist you?",
  greetingSubtext: "I can help you find products, answer questions, and more.",
  greetingIcon: "/path/to/greeting-icon.png"
});

Message Display

Control how messages are displayed in the chat:

Message Actions

OptionDescriptionDefault
showMessageActionsShow feedback buttonsfalse
showUserCopyButtonShow copy button on user messagesfalse
showMessageTimestampsShow message timestampsfalse

Loading Indicators

OptionDescriptionValues
loadingIndicatorStyle of loading animation'progress' or 'dots'
typingDelayDelay before showing response (ms)400
  • progress: Shows text updates like "Thinking...", "Searching products..."
  • dots: Shows bouncing dots animation
IntufindChatbot.configure({
  showMessageActions: true,
  showMessageTimestamps: true,
  loadingIndicator: 'progress',
  typingDelay: 300
});

Content Cards

When the AI finds products or posts, they're displayed as cards. Configure card display:

Card Layout

OptionValuesDescription
cardLayout'carousel'Horizontal scrollable cards (default)
'grid'Grid layout for cards

Post Card Options

OptionDescriptionDefault
showPostAuthorShow author nametrue
showPostDateShow publication datetrue
showPostCategoryShow categorytrue
IntufindChatbot.configure({
  cardLayout: 'carousel',
  showPostAuthor: true,
  showPostDate: true,
  showPostCategory: false
});

Live Agent Handoff

Configure human handoff behavior:

OptionDescriptionDefault
liveAgentEnabledEnable live agent featurefalse
liveAgentManualHandoffShow "Talk to Human" buttonfalse
liveAgentAutoHandoffAI can suggest handofffalse
liveAgentBusinessHoursBusiness hours text
liveAgentInactivityTimeoutTimeout in seconds
IntufindChatbot.configure({
  liveAgentEnabled: true,
  liveAgentManualHandoff: true,
  liveAgentAutoHandoff: true,
  liveAgentBusinessHours: "Mon-Fri, 9am-5pm EST",
  liveAgentInactivityTimeout: 300 // 5 minutes
});

JavaScript API

The widget exposes a global API for programmatic control:

Widget Control

// Open the chat
IntufindChatbot.open();

// Close the chat
IntufindChatbot.close();

// Toggle open/closed
IntufindChatbot.toggle();

// Check if open
const isOpen = IntufindChatbot.isOpen();

// Send a message
IntufindChatbot.sendMessage("Hello!");

// Start new conversation
IntufindChatbot.startNewConversation();

// Get all messages
const messages = IntufindChatbot.getMessages();

Configuration

// Update configuration
IntufindChatbot.configure({
  title: "New Title",
  showMessageActions: true
});

// Get current config
const config = IntufindChatbot.getConfig();

// Get full state
const state = IntufindChatbot.getState();
// { isOpen: boolean, config: ChatbotConfig }

Event Handling

// Listen for events
IntufindChatbot.on('message', (message) => {
  console.log('New message:', message);
});

IntufindChatbot.on('open', () => {
  console.log('Chat opened');
});

IntufindChatbot.on('close', () => {
  console.log('Chat closed');
});

// Remove listener
IntufindChatbot.off('message', callback);

Theme Control

// Set custom theme
IntufindChatbot.setTheme({
  colors: {
    primaryColor: '#FF6B6B'
  }
});

// Apply preset
IntufindChatbot.applyPreset('dark');

// Set custom CSS
IntufindChatbot.setCustomCSS(`
  .intufind-widget { border-radius: 24px; }
`);

Debug Mode

Enable debug mode for development:

IntufindChatbot.configure({
  debugMode: true
});

Debug mode logs:

  • API requests and responses
  • Configuration changes
  • Event emissions
  • Errors with stack traces

Platform Integration

WordPress

Configuration is managed through Intufind → Chat → Appearance in the WordPress admin.

Shopify

Configuration is managed through Apps → Intufind → Settings → Styling in Shopify admin.

Custom Integration

Use the JavaScript configuration:

<script>
window.intufindConfig = {
  publishableKey: 'if_pk_your_key_here',
  title: 'AI Assistant',
  widgetPosition: 'bottom-right',
  // ... other options
};
</script>
<script src="https://cdn.intufind.com/widget/v2/loader.js" async></script>

Or use data attributes for simpler setup:

<script 
  src="https://cdn.intufind.com/widget/v2/loader.js"
  data-publishable-key="if_pk_your_key_here"
  async
></script>

See the Next.js Integration Guide for React-specific patterns.

Next Steps