Options
UserMessage supports arbitrary content and an optional error line with a retry action.Message Content
The bubble caps at 640px and wraps long content; short messages stay compact.content accepts any ReactNode — a plain string, inline composition (Carto Link, strong, etc.), or a rendered Markdown tree.
Error
error renders a message below the bubble. Pair it with onRetry to add a retry action to the toolbar — the button appears only when both are set.
Behavior
The toolbar’s actions and visibility both respond to the message’s content and its position in the conversation.Content Length
The bubble never truncates or clips its content — it only wraps. There’s no maximum height or line count; a long message simply grows taller.Toolbar Actions
The toolbar always shows the timestamp, plus a copy action whenever there’s text to copy; retry joins them only whenerror is also set. Copy is text-only — pass copyText for rich content (Markdown, fragments, images) to keep the message copyable; a message with no text shows no copy button.
Reveal Toolbar on Hover
SetrevealToolbarOnHover on every message except the most recent of its type, so only the latest keeps its toolbar always visible — earlier messages reveal theirs on hover or keyboard focus. This distinction doesn’t apply on touch (coarse-pointer) devices, which always show the toolbar regardless of revealToolbarOnHover.