Ilana Docs
Embed Widget

Theming

WidgetTheme

Pass a theme object when initializing the widget to customize its appearance:

const widget = window.Ilana.init({
  botId: 'your-bot-id',
  token: 'your-embed-token',
  theme: {
    primaryColor: '#8b5cf6',
    backgroundColor: '#1a1a2e',
    fontFamily: 'Inter, sans-serif',
    borderRadius: '16px',
  },
});

Theme can also be set in the admin portal and delivered automatically via /embed-config.

Properties

Brand Colors

PropertyTypeDefaultDescription
primaryColorstringPrimary action color (buttons, links)
primaryHoverstringHover state for primary color
textOnPrimarystringText color on primary-colored backgrounds

Message Bubbles

PropertyTypeDefaultDescription
userBubbleColorstringBackground color of user message bubbles
assistantBubbleColorstringBackground color of assistant message bubbles
assistantTextColorstringText color in assistant message bubbles

Widget Chrome

PropertyTypeDefaultDescription
backgroundColorstringWidget background color
borderColorstringBorder color
headerBackgroundstringHeader area background color

Typography

PropertyTypeDefaultDescription
fontFamilystringCSS font family

Dimensions

PropertyTypeDefaultDescription
widgetWidthstring"380px"Widget width
widgetHeightstring"600px"Widget height
borderRadiusstringBorder radius
positionWidgetPosition"bottom-right"Screen position

Branding

PropertyTypeDefaultDescription
avatarUrlstringURL for the assistant avatar image
headerTitlestringOverride the header title text
greetingMessagestringWelcome message (supports {botName} variable)

FAB Icon

PropertyTypeDefaultDescription
fabIconFabIconConfigFloating action button icon configuration
interface FabIconConfig {
  type: 'preset' | 'custom';
  preset?: FabIconPreset;   // 'chat' | 'help' | 'message' | 'support' | 'assistant'
  customUrl?: string;        // URL to a custom icon image
}

Preset FAB Icons

PresetDescription
'chat'Speech bubble icon
'help'Question mark icon
'message'Message icon
'support'Headset/support icon
'assistant'Robot/AI assistant icon

Example: Fully Themed Widget

window.Ilana.init({
  botId: 'your-bot-id',
  token: 'your-embed-token',
  theme: {
    primaryColor: '#8b5cf6',
    primaryHover: '#7c3aed',
    textOnPrimary: '#ffffff',
    userBubbleColor: '#8b5cf6',
    assistantBubbleColor: '#27272a',
    assistantTextColor: '#e4e4e7',
    backgroundColor: '#18181b',
    borderColor: '#3f3f46',
    headerBackground: '#27272a',
    fontFamily: '"Inter", sans-serif',
    widgetWidth: '400px',
    widgetHeight: '650px',
    borderRadius: '16px',
    headerTitle: 'Acme Support',
    greetingMessage: 'Hi! How can {botName} help you today?',
    fabIcon: { type: 'preset', preset: 'support' },
  },
});