App components / Messaging
Message thread
The parts of a chat between people. Message bubbles: incoming in a card with the sender's name, outgoing in ink with its read state, holding text, a file or a reply. A Day divider splits the thread by day, and a Typing indicator sits at the foot while someone writes.
MembersReact · Vue · HTMLFigma: Messaging
Code
The component itself, ready to drop into your project. Switch between React, Vue and plain HTML; every version uses the same Tailwind classes on Ochre's tokens.
Mon 26 Oct
Maya Krishnan
The draft is ready. Can you look before Friday?
16:02
Today
Maya KrishnanThe draft is ready. Can you look before Friday?
Read it on the train. The importer section is clear; can we move billing to week two?
09:12Read
Maya Krishnan
Yes, that works. I'll update the dates.
09:20
Thanks. Sharing it with Sam now.
09:21Delivered
Maya Krishnan is typing
Installation
Examples
Sides and content
Incoming and outgoing, each with Text, File and Reply.
incoming
Maya Krishnan
The draft is ready. Can you look before Friday?
16:02
Maya Krishnan
Sam OkaforCan we move billing to week two?
Yes, I'll update the dates.
16:05
Motion
Built on Ochre's ease-out curves. With reduced motion switched on, everything still works, it just doesn't move.
01New bubbles rise into place.
02The typing dots breathe one after another, and the indicator rises in and leaves with the next message.
03The thread keeps the newest message in view.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| MessageBubble side | "incoming" | "outgoing" | "incoming" | Card with a name, or ink with a read state. |
| MessageBubble name / avatar | string / { name; src? } | false | – | Incoming only. The avatar comes from the name unless you pass false. |
| MessageBubble children | ReactNode | – | Text content. |
| MessageBubble file | { name; type?; size?; href? } | – | File content: a row with the type and size in mono and a download button. |
| MessageBubble replyTo | { name; text } | – | Reply content: the message it answers, quoted on top. |
| MessageBubble time / status | string / "sent" | "delivered" | "read" | – | Under the bubble in mono. Status is for outgoing messages. |
| MessageBubble grouped | boolean | – | A follow-up from the same person: no name or avatar, tighter corner. |
| DayDivider children | ReactNode | – | The day, in mono capitals: Today, Mon 26 Oct. |
| TypingIndicator name | string | – | Who is writing. |
| MessageThread | { children } | – | A scrolling log that keeps the newest message in view. |
Usage
Use it for
- Direct messages, comments on a record, and support conversations.
- Grouped follow-ups from the same person, so a run of messages reads as one voice.
Avoid
- Chat with an assistant: use the AI chat messages, which handle streaming and sources.
- Colour per person: names and sides already say who wrote what.