Raft Design System

Components · Messages

ConversationPanel

The main-area panel for one conversation — a panel header, an optional row of tabs, the message list and the composer.

StableAlso called Channel panel
import { ConversationPanel } from "@botiverse/raft-ui";

ConversationPanel lays out one conversation in the desktop main area: a channel or a direct message. It is a Panel with a PanelHeader, an optional row of tabs under it, the message list and the composer.

conversation-panel/compositions/conversation-panel

When to use

SituationUse
A channel or a direct message in the main areaConversationPanel
The replies to one message, beside the conversationThreadPanel
A profile beside the conversationA Panel with edge="attached"
A channel's tasks and filesSide sections in columns right of the whole panel, header included (Page structure)
Any other column of the main areaPanel

Anatomy

  • ConversationPanelRoot: the panel. It is a Panel with edge="inset" by default.
  • A PanelHeader: the conversation's location tile or avatar, its name, its description and its actions. Its parts and rules are in Panel.
  • ConversationPanelContent: everything under the header.
    • ConversationPanelTabs: an optional row of Tabs, with a line-seam under it. With a mouse the row is as tall as a header (44px with its seam), like the toolbar rows under a header; on a touch screen it keeps 8px above and below its tabs (list-toolbar-air), 49px with its seam, the toolbar over a list (Component tokens).
    • ConversationPanelBody: the scroll boundary for the message list.
    • ConversationPanelFooter: the composer (Composer). It adds no space above the composer: the list ends with pb-timeline-end under its last row, so the composer's frame sits a section step, 24px, under the last line (Timeline rhythm).
  • ConversationPanelEmptyState, with ConversationPanelEmptyStateBrand and ConversationPanelEmptyStateBrandMark: the panel's content when no conversation is open.

Variants

A place can hold several kinds of content, such as an agent's profile, activity and workspace. They are one row of sticker tabs in ConversationPanelTabs, under the header (Navigation). Leave the row out when the place has only one view, such as a thread.

Behavior

  • The header, the tabs and the composer stay in place; the message list is the only part that scrolls.
  • The row of tabs scrolls sideways on its own when the tabs don't fit (Tabs).
  • On a phone, the conversation is a pushed page: its header is the top bar, with Back (Responsive layout).

Accessibility

  • ConversationPanelRoot renders a section. Name it after the conversation with aria-label or aria-labelledby.
  • Name the row of tabs after the conversation as well (aria-label="launch-week" on the TabsList).
  • The header's buttons and the composer's field need their own names; see Panel and Composer.

Rules

  • Put the row of tabs directly under the header, outside the scrolling message list.
  • Start the first tab on the header's edge: 16px on a phone and with a mouse on a desktop, 20px on a touch screen from 768px, the same margin as the header's first element and the message avatar column (Page structure). ConversationPanelTabs sets this margin.

API

ConversationPanelBody, ConversationPanelContent, ConversationPanelEmptyState, ConversationPanelEmptyStateBrand, ConversationPanelEmptyStateBrandMark, ConversationPanelFooter

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

ConversationPanelRoot

PropTypeDefault
edgePanelEdge"inset"
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

ConversationPanelTabs

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

Changes

  • 0.105.0 · Design SystemA focus ring where its container clips ([States › Focus](https://raft-design.botiverse.build/foundations/states/#focus), [Elevation › Focus ring](https://raft-design.botiverse.build/foundations/elevation/#focus-ring)): where something around an element clips what is past its box (a row or a list that scrolls, an edge fade, overflow-hidden), the ring is kept whole. First the container makes room: it keeps the ring's reach inside its box as padding and gives it back with a negative margin, so the ring stays outside the element. Only where the container can't make room is the ring drawn inside the element (inset-ring-2). An element whose content runs to its sides draws the ring on a shape of its own. Changed in this release: TabsList, TabsTab, ConversationPanelTabs.
  • 0.21.1 · AddedMessageListEndFade: the fade over a message list's bottom edge. Put it beside MessageList, in the same positioned parent (ConversationPanelBody is one), like the jump controls; it lies under them, is hidden from assistive technology and takes no pointer events.