Components · Messages
ConversationPanel
The main-area panel for one conversation — a panel header, an optional row of tabs, the message list and the composer.
Also 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.
When to use
Anatomy
ConversationPanelRoot: the panel. It is aPanelwithedge="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 aline-seamunder 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 withpb-timeline-endunder its last row, so the composer's frame sits a section step, 24px, under the last line (Timeline rhythm).
ConversationPanelEmptyState, withConversationPanelEmptyStateBrandandConversationPanelEmptyStateBrandMark: 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
ConversationPanelRootrenders asection. Name it after the conversation witharia-labeloraria-labelledby.- Name the row of tabs after the conversation as well (
aria-label="launch-week"on theTabsList). - 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).
ConversationPanelTabssets this margin.
API
ConversationPanelBody, ConversationPanelContent, ConversationPanelEmptyState, ConversationPanelEmptyStateBrand, ConversationPanelEmptyStateBrandMark, ConversationPanelFooter
Also takes the attributes of its element.
ConversationPanelRoot
Also takes the attributes of its element.
ConversationPanelTabs
Also takes the attributes of its element.
Related
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 (ConversationPanelBodyis one), like the jump controls; it lies under them, is hidden from assistive technology and takes no pointer events.