Chat Bubble (Message Bubble)
The rounded shape around each message: yours on one side, theirs on the other.
Also known as: Message Bubble
<li> in role="log"When to use it
For any conversation or support chat.
Common mistake
Don’t rely on color alone to show who sent what.
Accessibility
Put messages in a role=log container so new ones are announced.
Name in code
| HTML/CSS | <li> in role="log" |
|---|---|
| React | <ChatBubble> (custom) |
| Jetpack Compose | Surface(shape = RoundedCornerShape) |
| SwiftUI | Text + .background(RoundedRectangle) |
Ready prompt for your coding agent
Add a Chat Bubble (Message Bubble) to this screen.
What it is: The rounded shape around each message: yours on one side, theirs on the other.
Implement with: <li> in role="log" (HTML/CSS).
Accessibility: Put messages in a role=log container so new ones are announced.
When to use it: For any conversation or support chat.
Avoid: Don’t rely on color alone to show who sent what.
Reuse the project's existing design tokens, spacing and component conventions.
Or compose a whole page from this element and others →
Prompts are in English for the most precise results with coding agents.