Botpress Cloud: Webchat Customization

Show Bot Info

Styling Webchat

You can Customize the Chatbot's Information Page using below CSS


To show bot information page, you will need to add showBotInfoPage : true in your webchat init object


1
/* Styling for the bot summary section */
2
.bpw-botinfo-summary {
3
margin-top: -32px; /* Move the section up by 32px */
4
border-bottom: solid 1px rgba(0, 0, 0, 0.1); /* Add a 1px solid border to the bottom */
5
box-shadow: 0px 4px 5px -5px var(--gray); /* Add a box shadow effect */
6
text-align: center; /* Center align the text */
7
}
8
9
/* Styling for the bot avatar */
10
.bpw-botinfo-summary .bpw-bot-avatar.default {
11
margin: 0 auto var(--spacing-medium); /* Center the avatar image and add some margin at the bottom */
12
}
13
14
/* Styling for the bot information container */
15
.bpw-botinfo-container {
16
margin: 0 auto; /* Center the container */
17
max-width: 800px; /* Set a maximum width of 800px */
18
width: 100%; /* Set the width to 100% */
19
text-align: center; /* Center align the text */
20
color: #1e1e1e; /* Set the font color to a dark gray */
21
overflow-y: auto; /* Add a vertical scroll bar if the content overflows */
22
height: 100%; /* Set the height to 100% */
23
}
24
25
/* Styling for the bot cover picture wrapper */
26
.bpw-botinfo-cover-picture-wrapper {
27
height: 50%; /* Set the height to 50% */
28
overflow: hidden; /* Hide any content that overflows the container */
29
}
30
31
/* Styling for the bot cover picture */
32
.bpw-botinfo-cover-picture {
33
width: 100%; /* Set the width to 100% */
34
object-fit: cover; /* Scale the image to fit the container and maintain its aspect ratio */
35
}
36
37
/* Styling for buttons and links */
38
.bpw-botinfo-container button,
39
.bpw-botinfo-container a {
40
font-size: 0.9em; /* Set the font size to 0.9em */
41
color: rgb(102, 102, 102); /* Set the font color to a light gray */
42
text-decoration: none; /* Remove any text decoration */
43
}
44
45
/* Styling for the bot description section */
46
.bpw-botinfo-description {
47
margin-top: 0.4em; /* Add some margin at the top */
48
margin-bottom: 1em; /* Add some margin at the bottom */
49
}
50
51
/* Styling for the bot summary header */
52
.bpw-botinfo-summary h3 {
53
margin: 0; /* Remove any margin */
54
}
55
56
/* Styling for the bot links section */
57
.bpw-botinfo-links {
58
border-bottom: solid 1px rgba(0, 0, 0, 0.1); /* Add a 1px solid border to the bottom */
59
}
60
61
/* Styling for each bot link */
62
.bpw-botinfo-link {
63
padding-left: 25%; /* Add some padding to the left */
64
display: flex; /* Use flexbox to align the content */
65
margin: 20px 0; /* Add some margin at the top and bottom */
66
}
67
68
/* Styling for the bot link icon */
69
.bpw-botinfo-link i {
70
margin-right: 10px; /* Add some margin to the right */
71
}
72
73
/* Styling for the preferred language section */
74
.bpw-botinfo-preferred-language {
75
margin: 20px 0; /* Add some margin at the top and bottom */
76
}
77
/* This section defines the styling for the user's preferred language dropdown select box */
78
.bpw-botinfo-preferred-language select {
79
/* Adds 10 pixels of margin to the left of the select element */
80
margin-left: 10px;
81
}
82
83
/* This section defines the styling for the terms and conditions link */
84
.bpw-botinfo-terms {
85
/* Adds 0 pixels of padding to the top and bottom, and 20 pixels of padding to the left and right */
86
padding: 0px 20px;
87
/* Aligns the text to the left */
88
text-align: left;
89
}
90
91
.bpw-botinfo-terms a {
92
/* Makes the anchor element a block-level element that is inline with the rest of the text */
93
display: inline-block;
94
/* Sets the width of the anchor element to 100% */
95
width: 100%;
96
/* Sets the height of each line of text within the anchor element to 2.5 times the font size */
97
line-height: 2.5;
98
/* Adds a solid 1 pixel border to the bottom of the anchor element with a slightly transparent black color */
99
border-bottom: solid 1px rgba(0, 0, 0, 0.1);
100
}
101
102
/* This section defines the styling for the start button */
103
.bpw-botinfo-start-button {
104
/* Sets the font of the element to inherit from the parent element */
105
font: inherit;
106
/* Sets the text color of the element to inherit from the parent element */
107
color: inherit;
108
/* Sets the background color of the element to be transparent */
109
background-color: transparent;
110
/* Changes the mouse cursor to a pointer when hovering over the element */
111
cursor: pointer;
112
/* Adds a 20 pixel border radius to the corners of the element */
113
border-radius: 20px;
114
/* Sets the height of each line of text within the element to 24 pixels */
115
line-height: 24px;
116
/* Adds 5 pixels of padding to the top and bottom, and 10 pixels of padding to the left and right of the element */
117
padding: 5px 10px;
118
/* Adds 25 pixels of margin to the top of the element */
119
margin-top: 25px;
120
/* Adds a solid 1 pixel border to the element with a gray color */
121
border: 1px solid rgb(100, 100, 100);
122
}
123
124
/* This section defines the styling for the start button when it has focus */
125
.bpw-botinfo-start-button:focus {
126
/* Changes the border color of the element to black when it has focus */
127
border: 1px solid black;
128
/* Changes the text color of the element to black when it has focus */
129
color: black;
130
}