--- title: "Message Bubble" slug: message-bubble category: component type: documentation version: 20.0.0 tokens: 532 source: https://ovh.github.io/design-system/v20.0.0/llms/react-components-message-bubble--documentation.txt --- # Message Bubble _The **Message Bubble** component is designed to display messages in a conversational interface._ ## Overview The **Message Bubble** component is designed to display messages in a conversational interface. It can be used in various contexts, such as customer support chats, messaging applications, or even internal communication tools within an organization. | | | |---|---| | Name | Message Bubble | | Design | TODO | | Source | https://github.com/ovh/design-system/tree/master/packages/ods-react/src/components/message-bubble | ## Usage The **Message Bubble** component is used to display individual messages within a conversation or chat interface. Common usages include: * Displaying user-generated text messages in a chat window * Showing system messages, like "Conversation started" or "User is typing...", to provide context and feedback to users * Using the component in a conversational AI interface to display AI-generated responses, complete with typing indicators and support for structured content ### Dos & Don'ts **Do** - Use within a conversational interface or a similar context where messages are exchanged between users or between a user and an AI assistant - Leverage the sender information features (Avatar, sender name) to provide clear context about who sent the message - Apply distinct visual treatments for different sender types (User, AI assistant, System) to enhance user understanding and engagement **Don't** - Don't use the Message Bubble component as a replacement for a text input field; it's meant for displaying messages, not for user input - Don't use the component in a way that could lead to confusion about the sender's identity or the message's content ### Best Practices in Context 1. **Message Bubble** 2. **Content** ## Behavior The component supports several states that reflect its current condition or the status of the message: * **Typing**: Indicates that the message is being either typed by a human or generated by an AI assistant. * **Error**: Displays an error state when message delivery fails, providing visual feedback to the user