Skip to content

Chat message

The chat message represents an individual message in a conversational interface.

Usage

The chat message displays conversational content exchanged between participants. It helps users follow the dialogue and distinguish who sent each message.

There are two variants:

  • User message: represents the message sent by the user
  • AI message: represents the automated or system-generated response

User message

Displayed as a text bubble, the user message visually represents the user’s contribution to a conversation. It may support contextual actions such as copy, edit, or delete.

Use it in chat interfaces where user input is shown as part of a dialogue, or in conversation histories and transcripts.

User message

AI message

The AI message visually distinguishes automated responses from user input. It can include optional actions or related content relevant to the user.

Use it to display AI-generated content in chat interfaces, or to provide system-driven assistance, explanations, or follow-up actions.

AI message

Best practices

  • Allow user interaction (feedback, retry, copy) when appropriate.
  • Always place the AI message directly in the background. Do not wrap it in an additional container.
  • Constrain the AI message to a maximum width of 720px for readability.

Except where otherwise noted, content on this site is licensed under MIT License.