Customizing the bot user interface - 1 - The Card
# 📖tutorials
w
Even though botpress has a very clean basic bot UI, it can sometimes be tempting to add a personal touch to evolve the basic UI I start with the card It's just a bit of css that you can copy and paste to the style (http://styler.botpress.app) for the v1
Copy code
.bpw-card-container {
    font-family: "Lexend", sans-serif;
    line-height: 1.5;
    background-color: #FFF;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 20px 50px 0 rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;
    padding: 1.25rem;
    width: 300px;
    max-width: 400px;
    transition: 0.15s ease-in;
    padding-bottom: 25px;
}
.bpw-card-container:hover,
.bpw-card-container:focus-within {
    box-shadow: 0 0 0 2px #16C79A, 0 10px 60px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}
.bpw-card-picture {
    border-radius: 10px;
    overflow: hidden;
    height: 200px;
    background-size: cover;
    background-position: center;
}
.bpw-card-header {
    margin-top: 1.5rem;
}
.bpw-card-title {
    font-weight: 600;
    font-size: 1.375rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.bpw-card-subtitle {
    font-size: 1em;
    color: #666;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}
.bpw-card-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
    box-shadow: none;
    border: none;
    align-items: center;
    text-align: center;
    transform: translateY(-10px);
}
.bpw-card-buttons:hover > .bpw-card-action{
  text-decoration: none;
  color: #333;
}
.bpw-card-action {
    display: block;
    text-decoration: none;
    background: linear-gradient(to bottom, 
    #fff 0%,     
    #fff 80%,    
        #16C79A 80.1%,
    #16C79A 100%      
) no-repeat;
    color: #333;
    padding: 12px 24px;
    border-radius: 2px;
    font-size: 0.9em;
    font-weight: 500;
    background-size: 40% 100%;
    width: 30%;
    box-shadow: none;
    border: none;
    transition: all 0.25s ease;
}
.bpw-card-action:hover {
    background-size: 100% 100%;
}
and add
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800;900&display=swap');
for the font
let me know if this is useful 😉 !
f
Hi there. I love this improvement. Where should I paste this code tho? Thanks 👍🏻
w
Hi ! Just paste this code in the stylesheet (advanced css styler) http://styler.botpress.app
I’m glad you like this !
f
Oh ok, thanks again 🙏🏻
3 Views