Docs

Widget Styling & Customization

Control the widget appearance via init options or the Dashboard UI.

Size Presets#

Choose from three built-in size presets via chatSize and launcherSize:

chatSizeChat WindowLauncher
compact340 x 460 px48 px
default380 x 520 px60 px
large420 x 600 px68 px

launcherSize accepts small, default, or large — controls the floating button independently.

Respondo.init({
  agentId: 'YOUR_AGENT_ID',
  chatSize: 'large',        // wider & taller chat window
  launcherSize: 'small'     // smaller floating button
});

Positioning#

Fine-tune the widget position with offsetBottom and offsetSide (in pixels). Combined with position (bottom-right or bottom-left), this gives full control over placement.

Respondo.init({
  agentId: 'YOUR_AGENT_ID',
  position: 'bottom-left',
  offsetBottom: 40,          // 40px from bottom (default: 20)
  offsetSide: 30             // 30px from left edge (default: 20)
});

Border Radius & Z-Index#

borderRadius controls the chat window corner rounding (default: 12px).zIndex sets the stacking order (default: 999999).

Respondo.init({
  agentId: 'YOUR_AGENT_ID',
  borderRadius: 20,    // rounder corners
  zIndex: 100000       // lower z-index to avoid conflicts
});

Custom CSS#

For advanced styling beyond built-in options, pass a customCSS string. It is injected into the widget's Shadow DOM — it can override any widget style but cannot affect your page.

Respondo.init({
  agentId: 'YOUR_AGENT_ID',
  customCSS: `
    .respondoai-chat {
      border-radius: 24px;
      box-shadow: 0 12px 48px rgba(0,0,0,0.2);
    }
    .respondoai-launcher {
      box-shadow: none;
      border: 2px solid #e5e7eb;
    }
    .respondoai-header {
      backdrop-filter: blur(10px);
    }
    .respondoai-message.assistant {
      background: #f0f9ff;
    }
    /* Style the CTA button inside announcement cards */
    .respondoai-announcement-cta-button {
      border-radius: 999px;
      font-weight: 600;
      letter-spacing: 0.2px;
    }
    /* Lay out announcement CTA buttons in a row instead of the default stack */
    .respondoai-announcement-ctas {
      flex-direction: row;
    }
  `
});
Custom CSS runs inside Shadow DOM — it is completely isolated from your page styles. You can safely override any widget class without side effects.

Available CSS classes:

ClassElement
.respondoai-widgetRoot container (position, z-index)
.respondoai-launcherFloating button
.respondoai-chatChat window
.respondoai-headerChat header bar
.respondoai-messagesMessage list container
.respondoai-message.userUser message bubble
.respondoai-message.assistantBot message bubble
.respondoai-input-areaInput bar container
.respondoai-inputText input field
.respondoai-sendSend button
.respondoai-suggestion-btnQuick question buttons
.respondoai-announcement-cta-buttonCTA button inside an announcement card
.respondoai-announcement-ctasWrapper around the CTA buttons in an announcement card (target layout)
You can also configure all styling options from the Dashboard — go to Channels → Widget → Appearance. Changes made in the dashboard are served to the widget automatically via the config API.