Skip to main content

Sizing

The chatbot frame dimensions and the max width of message content can all be overridden via theme.chatbot. Defaults are width: 375px, height: 640px, contentMaxWidth: 1200px.

Sizing Controls

contentMaxWidth controls the max width of message content inside the bubble.

Current Theme Config

{
  "chatbot": {
    "width": "375px",
    "height": "640px",
    "contentMaxWidth": "1200px"
  }
}
Loading chatbot...
tip

Beyond width / height, you can also use maxWidth, minWidth, maxHeight, and minHeight for responsive control.

Code Example

import { Chatbot, ChatbotTheme } from "@asgard-js/react";

const sizingTheme: ChatbotTheme = {
chatbot: {
width: "375px",
height: "640px",
maxWidth: "100%",
maxHeight: "80vh",
contentMaxWidth: "800px",
},
};

<Chatbot theme={sizingTheme} {...rest} />;

Sizing Fields

FieldDefaultDescription
width375pxChatbot frame width
height640pxChatbot frame height
maxWidthUpper bound on frame width
minWidthLower bound on frame width
maxHeightUpper bound on frame height
minHeightLower bound on frame height
contentMaxWidth1200pxMax width of the message content area