CSS SPEECH BUBBLE GENERATOR
Build a chat-style speech bubble with a tail on any side and copy the CSS.
In short
Build a chat-style speech bubble with a CSS border-trick tail on any side — pick the tail side, position, and size, plus bubble and text color, on a live preview, then copy the CSS. No image or SVG needed, runs entirely in your browser.
Speech bubble text goes here.
.bubble {
position: relative;
display: inline-block;
max-width: 320px;
background: #ff6a35;
color: #201d19;
border-radius: 14px;
padding: 16px 20px;
}
.bubble::after {
content: "";
position: absolute;
top: 100%;
left: 24%;
transform: translateX(-50%);
border-width: 14px 14px 0 14px;
border-color: #ff6a35 transparent transparent transparent;
}How to build a speech bubble
- 1
Pick which side the tail points from: bottom, top, left, or right.
- 2
Adjust the tail's position along that edge and its size on the live preview.
- 3
Set the bubble's corner radius, background color, and text color.
- 4
Copy the generated CSS and HTML and drop it into a chat UI or callout.
Questions
- How does a CSS triangle become a speech bubble tail?
- A zero-size element with only borders visible forms a triangle: giving one border a color and making the adjacent two transparent leaves only a diagonal edge painted, which reads as a triangle pointing away from the solid side. Positioning that triangle flush against one edge of the bubble with position: absolute turns it into a tail.
- Why is the tail a separate pseudo-element instead of part of the bubble's shape?
- clip-path could cut a tail shape out of the bubble directly, but it can't also keep the bubble's rounded corners and drop shadow intact in the same operation without much more complex path math. A ::after pseudo-element with border-trick triangle is simpler, keeps the bubble's border-radius untouched, and lets the tail's color update independently.
- How do I move the tail along the edge?
- The tail is positioned with a left or top percentage (depending on which side it points from) and transform: translateX(-50%) or translateY(-50%) to keep it centered on that offset. Dragging the Tail position slider changes that percentage, moving the tail from one corner of the bubble toward the other.
- Can I add a border or shadow to the bubble?
- Yes — add a border or box-shadow to .bubble as usual. Note that a border won't automatically extend onto the triangle tail; for a bordered look, either add a second, slightly larger triangle in the border color behind the tail, or skip the border and rely on a box-shadow instead, which doesn't have this issue.
- Does this tool store or upload my bubble design?
- No — everything here is generated and rendered locally in your browser. Nothing is sent to a server.
Related tools
- CSS Squircle GeneratorBuild an iOS-style continuous-curve squircle from a superellipse formula rendered as a clip-path polygon, and copy the CSS.
- CSS Clip-Path GeneratorDrag points on a live preview to build a clip-path: polygon() shape from a preset or from scratch, and copy the CSS.
- CSS Blob GeneratorRandomize an organic blob shape from a single border-radius value and copy the CSS.
- CSS Triangle GeneratorBuild a pure-CSS triangle with the border trick — direction, size, and color — and copy the CSS.
- CSS Mask / Fade Edge GeneratorFade out the edges of an image or block with a mask-image gradient — top, bottom, sides, or all edges — and copy the CSS.
- CSS Ribbon GeneratorGenerate CSS and HTML for a diagonal corner sash or a banner ribbon with a swallowtail, arrow, or flat tail, with custom text, colors, and shadow.
- CSS Link Underline Effects GeneratorBrowse a gallery of 10 hover underline effects for links — slide in, center out, double line, dot grow, and more.
- CSS Ticket & Coupon Shape GeneratorGenerate CSS for a ticket or coupon shape with notched sides, top and bottom, or cut corners and a dashed perforation line, using a transparent mask.
Updated