components

Tailwind CSS Chat Bubble

Chat bubbles are ideal for organizing conversations in messaging apps, chats, social media platforms, and similar spaces.

Class Name
Type
Description
chatComponentThe class for the chat container which contains the chat bubbles.
chat-bubbleComponentFor the content of chat.
chat-receiverModifierFor the chat bubble of the receiver.
chat-senderModifierFor the chat bubble of the sender.
chat-avatarComponentFor display avatar of the sender or receiver.
chat-headerComponentFor the header of the chat bubble.
chat-footerComponentFor the footer of the chat bubble.

Assign the chat-receiver class to the receiver’s chat bubble and the chat-sender class to the sender’s chat bubble.

Apply the chat-avatar class to show the avatar of either the sender or the receiver.

Apply the chat-header class to incorporate a header into the chat bubble.

Apply the chat-footer class to incorporate a footer into the chat bubble.

Here’s an example of a chat bubble that includes an avatar, header, and footer.

This is an example of a chat bubble featuring an image.

The following example demonstrates a chat bubble containing multiple images sent or received.

Here’s an example of a chat bubble with a file attachment.