Documentation/Widget Integration/Styling
Widget Styling
Customize the appearance of the chat widget with CSS.
CSS Class Reference
Available CSS classes for styling the widget
| Class | Description |
|---|---|
| .sensei-widget-container | Main container for the entire widget |
| .sensei-chat-button | The floating chat button |
| .sensei-chat-panel | The chat panel/window |
| .sensei-chat-header | Header area with bot name |
| .sensei-chat-messages | Messages container |
| .sensei-message-user | User message bubbles |
| .sensei-message-bot | Bot message bubbles |
| .sensei-chat-input | Input area at bottom |
Custom CSS Examples
Change Widget Position
/* Move to bottom-left */
.sensei-chat-button {
right: auto !important;
left: 20px !important;
}
.sensei-chat-panel {
right: auto !important;
left: 20px !important;
}Customize Colors
/* Custom message colors */
.sensei-message-user {
background: #4F46E5 !important;
}
.sensei-message-bot {
background: #F3F4F6 !important;
color: #1F2937 !important;
}Resize Widget
/* Larger chat panel */
.sensei-chat-panel {
width: 420px !important;
height: 650px !important;
}
/* Full screen on mobile */
@media (max-width: 640px) {
.sensei-chat-panel {
width: 100vw !important;
height: 100vh !important;
bottom: 0 !important;
right: 0 !important;
border-radius: 0 !important;
}
}Tip: Use
!important to override the widget's default styles. Add custom CSS to the client's website stylesheet.