Message
Shows one message in a conversation, from a person or from an assistant: what was said, the pictures and files sent with it, how people reacted, where it sits among the messages around it, and whether yours arrived.
Examples
States
Usage
Use it when
- A conversation between people: a guest and a host, two analysts about a filing, a customer and support.
- An assistant's reply in a research tool, with a
Traceabove its answer. - Pictures, files and reactions sent in such a conversation, as part of the message that carries them.
Use something else when
- A list of events in order, such as a booking's history. Use Timeline instead.
- A one-line notice that something happened. Use Alert instead, or a toast from Toaster.
- A gallery or a listing's photos. Use MediaTile instead.
- Marking a thing to come back to. Use SaveToggle instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/message.json https://kaanarici.com/r/cobalt/message-attachment.json https://kaanarici.com/r/cobalt/reactions.jsonimport { Message, MessageActions, MessageAnswer, MessageAside, MessageBubble, MessageContent, MessageDeleted, MessageFooter, MessageQuote, MessageStatus, MessageText, MessageThinking, MessageTime } from "@/components/cobalt/ui/message"import { MessageFile, MessageImages } from "@/components/cobalt/ui/message-attachment"import { Reaction, ReactionAdd, Reactions } from "@/components/cobalt/ui/reactions"