Magoo Component UI logo Magoo Component UI
← Catalog

AI Chat Message

chat-message-ai molecule experimental

A single assistant reply with an AI avatar, message bubble, and a copy/rate/regenerate action row.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default

Content content

gpt-4o 9:41 AM
Rich

Here are three ways to improve first paint:

  • Inline critical CSS and defer the rest.
  • Preload the hero image and web fonts.
  • Split the bundle so above-the-fold code loads first.
claude-opus 10:12 AM

Props

NameTypeReq
content string
model string
time string

Slots

  • content — Rich message body (paragraphs, lists, code). Overrides the content prop.

Related components

How to use

behavior.js reads the rendered text from the content element, so no configuration is needed. The copy button writes the message to the clipboard and briefly swaps its glyph to a check mark, then restores it. The regenerate button dispatches a bubbling "chat:regenerate" CustomEvent you can listen for on a parent to request a new completion. The thumbs buttons are skeleton affordances; wire a feedback-thumbs component in for persisted ratings.

Use cases

list-item WCAG AA SEO 20 dir: both ai-generated