Pinatool

CSS Speech Bubble Generator

Design responsive chat bubbles, tooltips, and quote callouts with tails on any side. Configure dimensions, borders, and shadows, then copy production-ready HTML and CSS.

Speech Bubble Preview

Dual-layer pseudo-elements preserve border continuity on the tail.

Hey there! How can I help you customize your project today?

Presets

Tail Placement

Generated HTML & CSS

Copy the semantic HTML or dual-layer CSS with matched tail borders.

<div class="speech-bubble">
  Hey there! How can I help you customize your project today?
</div>

.speech-bubble {
  position: relative;
  width: 360px;
  max-width: 100%;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  color: #0f1d3a;
  box-shadow: 0 12px 30px rgb(15 29 58 / 16%);
}

.speech-bubble::before,
.speech-bubble::after {
  content: "";
  position: absolute;
}

.speech-bubble::before {
  position: absolute;
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  width: 20px;
  height: 14px;
  left: 25%;
  bottom: -14px;
  transform: translateX(-50%);
  background: #e2e8f0;
}

.speech-bubble::after {
  position: absolute;
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  width: 18px;
  height: 14px;
  left: 25%;
  bottom: -13px;
  transform: translateX(-50%);
  background: #ffffff;
}

How It Works

1

Pick Tail Side & Position

Select top, bottom, left, or right edge placement and slide the tail position along the bubble perimeter.

2

Customize Colors & Border

Set background, text, and border colors. Adjust corner radius, padding, and toggle soft drop shadows.

3

Copy HTML & CSS

Copy clean, vendor-free CSS and semantic HTML, or download a standalone stylesheet ready for your website.

CSS Speech Bubble Generator Key Features

Continuous Tail Borders

Nested pseudo-elements seamlessly preserve border outlines on the triangle tail without awkward gaps or clipping artifacts.

Zero JavaScript in Production

The exported speech bubble is pure HTML and CSS with no runtime script dependencies, keeping your site lightweight.

Dual Pseudo-Element Border & Drop-Shadow Sync

The ::before and ::after triangles automatically sync with your border thickness, border color, and drop shadow across all four sides, ready for filter: drop-shadow() outlines.

Frequently Asked Questions

How does the tail keep a continuous border with the bubble?

The generator uses dual pseudo-elements (::before and ::after) clipped into triangles with CSS clip-path. The outer layer matches the bubble border color, while the slightly inset inner layer matches the bubble background, creating an unbroken border around both the box and the pointer tail.

Can I place the tail on any side and position?

Yes. You can position the tail on the Top, Right, Bottom, or Left edge, and adjust its position along that edge from 10% to 90% using the Tail Edge Position slider.

Is the generated speech bubble mobile-responsive?

Yes. The CSS sets max-width: 100% so the bubble automatically scales down to fit narrow smartphone screens without breaking its tail alignment or overflowing container margins.

What happens when border width is set to 0?

When border width is 0, the generator optimizes the CSS output by rendering a single ::before pseudo-element with the bubble fill color, removing unnecessary duplicate pseudo-element declarations.

Why should you use filter: drop-shadow() instead of box-shadow on a CSS speech bubble?

Standard box-shadow only outlines the rectangular bubble container and ignores the ::before and ::after pointer triangles, leaving the tail flat. Using filter: drop-shadow() traces the combined alpha silhouette of the bubble and its tail together for a unified shadow.