JSFiddle - React, Tailwind, and code Playground

by ckissi

HTML

<div class="bubble-10">Hello! I'm a basic speech bubble</div>

<div class="speech-bubble customizable" style="background-color: lightblue; border-radius: 15px;">
    Customize me!
</div>

<div class="bubble-double">Double the border, double the fun!</div>

<div class="bubble-dots">
    <span class="dot"></span>
    <span class="dot"></span>
    <span class="dot"></span>
    Typing...
</div>

<div class="bubble-glass">Glass effect bubble!</div>

<div class="bubble-heartbeat">❤️ Beating bubble!</div>

CSS

.bubble-2 {
    position: relative;
    background: #ff6b6b;
    border-radius: 50%;
    padding: 30px;
    color: white;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 20px;
}

.bubble-2:before {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: #ff6b6b;
    border-radius: 50%;
}

.bubble-3 {
    position: relative;
    background: #4ecdc4;
    padding: 20px;
    border-radius: 30px;
    color: white;
    margin: 30px;
}

.bubble-3:after,
.bubble-3:before {
    content: '';
    position: absolute;
    background: #4ecdc4;
    border-radius: 50%;
}

.bubble-3:after {
    width: 15px;
    height: 15px;
    right: 20px;
    bottom: -20px;
}

.bubble-3:before {
    width: 10px;
    height: 10px;
    right: 10px;
    bottom: -30px;
}

.bubble-4 {
    position: relative;
    background: #9b59b6;
    padding: 20px;
    color: white;
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%);
    margin: 20px;
}

.bubble-5 {
    position: relative;
    background: #95a5a6;
    padding: 20px;
    border-radius: 30px;
    color: white;
    margin: 20px;
    box-shadow: 
        20px 20px 0 -5px #95a5a6,
        40px 20px 0 -10px #95a5a6;
}

.bubble-6 {
    position: relative;
    background: #000;
    padding: 20px;
    border-radius: 10px;
    color: #fff;
    margin: 20px;
    border: 2px solid #0ff;
    box-shadow: 0 0 10px #0ff;
    text-shadow: 0 0 5px #0ff;
}


.bubble-7 {
    position: relative;
    background: #fff;
    padding: 20px;
    border: 4px solid #000;
    border-radius: 30px;
    margin: 20px;
    font-weight: bold;
    filter: drop-shadow(3px 3px 0 #000);
}

.bubble-8 {
    position: relative;
    border-left: 4px solid #3498db;
    padding: 10px 20px;
    margin: 20px;
    background: #f8f9fa;
}

.bubble-9 {
    position: relative;
    background:...