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

Source citations

AI messages can optionally surface the sources that informed a response. Two chips are available for this purpose:

  • Inline source chip: appears at the end of the message body, embedded in the text flow. Shows the title of the first cited source, with a +N suffix when multiple sources are present.
  • Summary source chip: appears in the actions row below the message. Shows a globe icon and a "Sources" label. Place it there using the siAiMessageAction directive.

Both chips open a popover that lists all cited sources with their title, excerpt, and a link.

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.