GenAI Widget Theming

Theme options are managed in the Preferabli dashboard and fetched by the widget at runtime. They are not passed in the client-side script. The following defaults apply when not overridden in the dashboard.

For CSS class overrides inside the iframe, see Widget Element Classes.


Theme Configuration (Server-Side)

OptionTypeDefaultDescription
primaryColorString"#1E3264"Primary brand color (button background, etc.)
secondaryColorString"#1E3264"Secondary color
userDialogBackgroundColorString"#89ED96"Background color for user message bubbles
systemDialogBackgroundColorString"#1E3264"Background color for system/assistant message bubbles
systemAvatarBgColorStringprimaryColorBackground color for the assistant avatar circle. Falls back to primaryColor when unset
userAvatarBgColorStringsecondaryColorBackground color for the user avatar circle. Falls back to secondaryColor when unset
textColorString"#051024"Primary text color
secondaryTextColorString"#1E3264"Secondary text color
buttonTextColorString"#ffffff"Text color on the floating chat button
buttonPositionString"bottom-right"Position of the floating button. Options: top-left, top-right, bottom-left, bottom-right
buttonIconString(default star SVG)URL to an image or inline SVG for the button icon
buttonRadiusString"99999px"Border radius of the button (e.g. "8px" or "99999px" for pill)
logoUrlStringPreferabli logo URLLogo displayed in the chat UI
systemProfilePictureUrlStringPreferabli icon URLAvatar for the assistant in the chat
userProfilePictureUrlString""Avatar for the user in the chat. When empty, a default user icon is shown
frameWidthString"standard"Width of the chat panel on desktop
frameHeightString"standard"Height of the chat panel on desktop

Chat Panel Sizes

For the chat panel sizing, the plugin supports 5 themes for width and 5 themes for height.

  • compact
  • medium
  • standard
  • expanded
  • wide
Width tokenSize
compact450px
medium525px
standard600px
expanded675px
wide750px
Height tokenSize
compact550px
medium650px
standard750px
expanded850px
fullviewport height (100vh)

See the image below for the width and height options and the string values for the frameWidth and frameHeight variables.

Note: The plugin separately uses a full screen sizing for mobile devices. Invalid frameWidth / frameHeight values fall back to "standard".


Did this page help you?