Skip to content

Components

Messaging

Components for an inbox: presence, conversation lists, threads, typing and the composer.

Components
Presence, avatar group, list, thread, message, reply card, internal note, typing, composer, attachment
Built for
Support inboxes and omnichannel messaging

Inbox

A conversation list, the thread with its composer, and the details. The panes are a split view with the thread on the canvas. Each pane has at most one primary action.

The split fills the height under the page header. The details pane shows above 64rem; below 40rem, one pane shows at a time.

Avatar and presence

A glyph on the avatar's corner shows availability. Shape and hue both carry the state, and the label names it.

Use

  • role="img" and a label with name and state: "Carla Melo, busy".
  • Presence for agents and colleagues.

Avoid

  • A colored dot alone.
  • Presence on customers.

Avatar group

Overlapping avatars for the people on a ticket, then a count of the rest. Name them in a sentence beside it.

Component tokens

Conversation list

Rows for an inbox or a picker; each row is one control. Selected rows take the brand tint and bar; unread rows are semibold with a strong count. The list is one tab stop: Up and Down move, Home and End jump.

Use

  • A link per row to open a conversation; a button to select in place.
  • aria-current="true" on the open conversation, data-unread on unread ones.
  • sg-list--plain for no hairlines between rows.

Avoid

  • A list for records compared by column: use a table.
  • Rows that move under the pointer: hold new ones behind a "show them" bar.
Component tokens

Thread and messages

Messages in time order, with date dividers. Inbound messages sit on the raised surface, outbound ones on the brand tint at the end side. Consecutive messages from one person drop the name and avatar. Delivery is a glyph and a word.

Internal notes

A card in the thread for text only the team sees. It takes the note tint, spans the thread, and always shows "Internal note" with its glyph, then the author and time. Its options button offers Edit, Pin, Copy text and Delete; show only what the person may do. data-sg-relative on a <time> shows "5 minutes ago", with the exact time on hover.

Use

  • A note for anything the customer must not read.
  • sg:noteaction to save each change; cancel it to refuse.
  • An Undo toast after a delete.
  • One pinned note per conversation, at the top of the thread.

Avoid

  • A message bubble in another color.
  • Options that show only on hover.
  • Edit and Delete for people who may not use them.

Reply to a message

Each message has a reply button, shown on hover, on focus and always on touch screens. It quotes the message in a reply card above the text; the card's button or Esc cancels. The sent reply keeps the card, which links to the message and rings it. A thread's reply and options buttons are one tab stop: ↑ and ↓ move between them.

Use

  • data-sg-composer="#thread" to tie the composer to a thread.
  • A label on each reply button that names the message.
  • replyTo in sg:composersubmit to send the reference.

Avoid

  • Quoted text pasted into the reply.
  • Quotes longer than one line.
  • Reply buttons only a pointer can reach.

List style

For long messages, transcripts or an assistant's answers. sg-thread--list shows each message as a full-width row with no bubbles; the other party's rows sit on a band.

Use

  • role="log" and aria-live="polite" on the thread.
  • The list style for long or formatted messages.
  • 24-hour times, and the date in the divider.
  • Delivery words: Sent, Delivered, Read.

Avoid

  • Scrolling while someone reads back: show "New messages".
  • Colored bubbles per person or per channel.
Component tokens

Typing indicator

Three rising dots, then who is typing. It loops on the loop duration; under reduced motion the dots stand still.

Use it in its own status region outside the log, and remove it when the message arrives. Avoid one per person: write "3 people are typing".

Component tokens

Composer

One rounded field: the text on top, then one row for tools, toggles and send. Internal note turns the box to the note tint and says who will see it. Sign as adds the agent's name to the reply. Send lights up once there is something to send; Ctrl Enter sends.

Attach opens the file picker; pasted files are added too. Each file becomes a tile above the text with a preview, name, size and remove button. Images and videos show the picture; documents show an icon. A picture from the server can show a tiny preview first (--sg-attachment-preview on the thumb) and fades in once loaded.

Use

  • A label on the text for each mode.
  • The agent's name on the signature toggle.
  • The same tiles, without remove, on sent messages.
  • sg:composersubmit to send; it carries the mode, text and signed. Cancel it to keep the text if sending fails.

Avoid

  • Color as the only sign of note mode.
  • Tools the product does not support.
  • Extra rules or bars inside the box.
Component tokens