Skip to content
Widget Styling

You can customize the appearance of your chatbot by modifying the following CSS variables:

Usage

.ygpt-chatbot.ygpt-chatbot {
/* FONT STYLE */
--yourgptChatbotFontFamily: 'Roboto', sans-serif;
/*_ PRIMARY COLOR _*/
--yourgptChatbotPrimaryColor: #000;
/*_ FOR SAHDES PLEASE ADD HSL VALUES IN FORMAT OF - H S% L% _*/
--yourgptChatbotPrimaryColorHsl: 0 0% 0%;
--yourgptChatbotSurfaceColorHsl: 0 0% 0%;
--yourgptChatbotTextColorHsl:0 0% 0%;
/*_ USER MESSAGE STYLING _*/
--yourgptChatbotUserMessageBgColor: #f5f5f5;
--yourgptChatbotUserMessageTextColor: #000;
/*_ BOT MESSAGE STYLING _*/
--yourgptChatbotBotMessageBgColor: #f5f5f5;
--yourgptChatbotBotMessageTextColor: #000;
}
#### CSS Variables
| Variable | Description |
| -------------------------------------- | ------------------------------------------ |
| `--yourgptChatbotFontFamily` | Font family of the chatbot |
| `--yourgptChatbotPrimaryColor` | Primary color of the chatbot |
| `--yourgptChatbotPrimaryColorHsl` | Primary color of the chatbot in HSL format |
| `--yourgptChatbotSurfaceColorHsl` | Surface color of the chatbot in HSL format |
| `--yourgptChatbotTextColorHsl` | Text color of the chatbot in HSL format |
| `--yourgptChatbotUserMessageBgColor` | Background color of the user message |
| `--yourgptChatbotUserMessageTextColor` | Text color of the user message |
| `--yourgptChatbotBotMessageBgColor` | Background color of the bot message |
| `--yourgptChatbotBotMessageTextColor` | Text color of the bot message |

Animations

You can inject custom animations to the widget button using the following CSS:

Multi-Gradient
/* Styling for the outer widget button */
.ygpts-widgetBtnMiddle::before {
content: "";
/* Creating a gradient background */
background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
position: absolute;
top: -2px;
left: -2px;
background-size: 400%;
z-index: -1;
/* Applying a blur effect */
filter: blur(5px);
width: calc(100% + 4px);
height: calc(100% + 4px);
/* Applying an animation */
animation: glowing 20s linear infinite;
transition: opacity 0.3s ease-in-out;
border-radius: 50px;
opacity: 1;
}
/*_ Styling for the after pseudo-element of the outer widget button _*/
.ygpts-widgetBtnMiddle::after {
z-index: -1;
content: "";
position: absolute;
width: 100%;
height: 100%;
/*_ Setting the background color _*/
background: #622bff;
left: 0;
top: 0;
border-radius: 40px;
}
/*_ Defining the glowing animation _*/
@keyframes glowing {
0% {
background-position: 0 0;
}
50% {
background-position: 400% 0;
}
100% {
background-position: 0 0;
}
}