StealThis .dev

Chat Bubble

Chat message bubbles with sender/receiver variants, avatar, timestamp, status indicators (sent/delivered/read), and grouping.

在 Lab 中打开
css
目标: HTML

代码

Chat Bubble

Message bubble components for chat interfaces, supporting both sent (outgoing) and received (incoming) variants with full status indicators.

Variants

  • Sent — right-aligned bubble with accent background (your messages)
  • Received — left-aligned bubble with subtle background (others’ messages)
  • Grouped — consecutive messages from the same sender collapse avatar and reduce spacing

Status indicators

sent · delivered · read

Each status is represented by a small icon below the sent message (single check → double check → blue double check).

Features

  • Pure CSS with no JavaScript
  • Avatar with fallback initials
  • Timestamps on each message
  • Grouping reduces visual clutter for rapid-fire messages
  • Accessible with role="log" and aria-label on the chat container