Easily integrate our AI agents into your web applications with our customizable web component.
You can add an AI agent anywhere on your website for any dataset using the following code. You can find a list of supported locales here.
<script src="https://bellatunes.ai/component/bella-ai.js"></script>
<bella-ai
clientId="CLIENT_ID"
clientPublicKey="CLIENT_PUBLIC_KEY"
dataSetId="DATASET_ID"
locale="en_US">
</bella-ai>
Web components use shadow DOM, therefore you can't directly control the classes within the component itself. To compensate for this, we've added a number of CSS variables that you can overwrite in your website's style sheets to adjust the layout of the AI agent chatbox.
<style>
:root {
--bella-border: 1px solid #ccc;
}
</style>
CSS Variable | Description |
---|---|
General | |
--bella-border | Defines the default border style for elements |
--bella-padding | Padding for the primary container. |
--bella-border-radius | Specifies the default border radius for rounded corners |
--bella-text-secondary-color | Sets the color for secondary text elements |
--bella-bg-color | Defines the default background color for elements |
--bella-hover-bg-color | Specifies the background color for elements when hovered |
--bella-link-color | Sets the color for hyperlinks |
Chat | |
--bella-chat-textarea-padding | Padding for the chat textarea |
--bella-chat-textarea-background | Background color for the textarea. |
--bella-chat-textarea-border | Border for the textarea. |
--bella-chat-textarea-border-radius | Border radius for the textarea. |
--bella-chat-textarea-margin | Margin for the chat textarea |
--bella-chat-textarea-height | Height of the chat textarea |
--bella-chat-messages-margin | Margin for the chat messages container |
--bella-chat-message-border | The border for chat messages |
--bella-chat-messages-gap | Gap between chat messages |
--bella-chat-message-user-bg | Background color for user messages |
--bella-chat-message-bella-bg | Background color for Bella's messages |
Predefined Questions | |
--bella-questions-padding | Padding for the questions container |
--bella-questions-flex-direction | Flex direction for the questions container |
--bella-questions-font-size | Size of the text used for questions |
--bella-questions-gap | Gap between questions |
--bella-questions-margin | Margin for the questions container |
--bella-questions-text-align | Text alignment for questions |
--bella-questions-font-weight | Font weight for questions |
Links | |
--bella-links-padding | Padding for the links container |
--bella-links-gap | Gap between links items |
--bella-links-text-align | Text alignment for links items |
--bella-links-flex-direction | Flex direction for the links container |
--bella-links-image-size | Size of the links images |
--bella-links-title-font-weight | Font weight for links titles |
--bella-links-title-font-size | Font size for links titles |
--bella-links-details-font-size | Font size for links details |
--bella-links-title-margin | Margin for links titles |
Miscellaneous | |
--bella-header-subsection-font-size | Font size for subsection headers |
--bella-header-subsection-text-align | Text alignment for subsection headers |
--bella-header-subsection-font-weight | Font weight for subsection headers |
--bella-header-subsection-padding | Padding for subsection headers |
--bella-header-subsection-text-color | Text color for subsection headers |