Botpress Cloud: Webchat Customization
Chat Header

You can Customize the Chatbot Header using below CSS
- Styles the Header Icon
1/* This block of CSS code styles a header icon element */2.bpw-header-icon {3/* Remove border */4border: none;5/* Remove background color */6background: none;7/* Remove padding */8padding: 0;9/* Remove margin */10margin: 0;11/* Set text color to a variable named shark */12color: var(--shark);13/* Set line-height to zero */14line-height: 0;15/* Set left margin to a variable named spacing-large */16margin-left: var(--spacing-large);17/* Align text to the right */18text-align: right;19/* Align element vertically in the middle */20vertical-align: middle;21/* Set cursor to a pointer */22cursor: pointer;23/* Set fill color to a variable named shark */24fill: var(--shark);25/* Set width to 16 pixels */26width: 16px;27/* Set height to 16 pixels */28height: 16px;29/* Set fill transition duration to 0.3 seconds */30transition: fill 0.3s;31}3233/* Apply the same fill color and fill transition to the icon's SVG and path elements */34.bpw-header-icon svg,35.bpw-header-icon svg path {36/* Set fill color to a variable named shark */37fill: var(--shark);38/* Set fill transition duration to 0.3 seconds */39transition: fill 0.3s;40}4142/* When the icon is hovered over, change the fill color to a variable named reef for the icon, SVG and path elements */43.bpw-header-icon:hover,44.bpw-header-icon:hover svg,45.bpw-header-icon:hover svg path {46fill: var(--reef);47}
- Styles the Header Title & Subtitle
1.bpw-header-title-flexbox {2/* sets the overflow behavior of the element */3overflow: hidden;4/* sets the text overflow behavior of the element */5text-overflow: ellipsis;6/* sets the flexbox properties of the element for webkit browsers */7-webkit-box-flex: 1;8/* sets the flexbox properties of the element for Microsoft browsers */9-ms-flex: 1 1 auto;10/* sets the flexbox properties of the element */11flex: 1 1 auto;12}1314.bpw-header-title-container {15/* sets the vertical alignment of the element */16-webkit-box-align: center;17-ms-flex-align: center;18align-items: center;19/* sets the display of the element to use flexbox for webkit browsers */20display: -webkit-box;21/* sets the display of the element to use flexbox for Microsoft browsers */22display: -ms-flexbox;23/* sets the display of the element to use flexbox */24display: flex;25}2627.bpw-header-title-container .bpw-bot-avatar {28/* sets the display of the element to none */29display: none;30}3132.bpw-header-title-container .bpw-bot-avatar svg {33/* sets the zoom level of the element */34zoom: 0.6;35}3637.bpw-header-name {38/* sets the font weight of the element */39font-weight: 500;40/* sets the font size of the element */41font-size: 14px;42/* sets the color of the element */43color: var(--zinc-600);44}4546.bpw-header-subtitle {47/* sets the overflow behavior of the element */48overflow: hidden;49/* sets the white space handling of the element */50white-space: nowrap;51/* sets the text overflow behavior of the element */52text-overflow: ellipsis;53/* sets the font weight of the element */54font-weight: 300;55/* sets the font size of the element */56font-size: 12px;57/* sets the color of the element */58color: var(--zinc-400);59}6061.bpw-header-unread {62/* sets the display of the element to none */63display: none;64}6566.sr-only {67/* sets the position of the element to absolute */68position: absolute;69/* sets the width of the element */70width: 1px;71/* sets the height of the element */72height: 1px;73/* sets the padding of the element */74padding: 0;75/* sets the margin of the element */76margin: -1px;77/* sets the overflow behavior of the element */78overflow: hidden;79/* clips the element to the given rectangle */80clip: rect(0, 0, 0, 0);81/* sets the border of the element */82border: 0;83}
- Menu items. (Use these values in the init object)
Customization Variable | Variable type | Default value | Description |
showConversationsButton |
boolean | true |
If false, will hide the conversation list pane |
enableTranscriptDownload |
boolean | true |
Allows the user to download the conversation history |
enableConversationDeletion |
boolean | false |
Allows the user to delete its conversation history |
showCloseButton |
boolean | true |
Display's the web chat close button when the web chat is opened |
- Styles the Header Container
1.bpw-header-container {2/* sets the border radius of the element */3border-radius: var(--spacing-large);4/* sets the background color of the element */5background: var(--white);6/* sets the border of the element */7border: 1px solid var(--zinc-200);8/* sets the border radius of the element (repeated declaration) */9border-radius: var(--spacing-medium);10/* sets the padding of the element */11padding: var(--spacing-large) var(--spacing-x-large);12}