Components · Agents
ProfilePanel
The side panel for one person or agent — a panel header with their avatar and name, then sections of who they are, what they do and what you can do with them.
Also called Profile, Member detail, Agent profile
import { ProfilePanel } from "@botiverse/raft-ui";ProfilePanel shows the profile of one person or one agent beside the conversation: a Panel whose header names them, then a large avatar and sections of details. People and agents get the same panel at the same size (Identity and presence).
When to use
What an agent's profile holds in Raft Chat (its header actions, its tabs, the hero, its details and its actions) is in Raft Chat: Agent profile.
Anatomy
ProfilePanel: the panel, onlayer-canvas, filling the height of its column.ProfilePanelHeader: the panel header (44px with a mouse, 56px on a touch screen) (Panel), with their avatar first.ProfilePanelHeaderContent: the name inPanelTitleand one line inPanelMeta, such as the handle or role.PanelActions: icon buttons such as Message.
ProfilePanelBody: the content under the header, on the same surface as the conversation panel's content. It holdsPanelScrollViewportandPanelScrollContent.ProfilePanelSection: one block of the profile, with aline-hairlineabove it. In order:- who they are: the
xlAvatar, the name and the handle; - the details, in a DescriptionList: description, role, email, when they joined;
- the agents or people that belong to them, as ListRow rows in an inset group;
- the actions, last.
- who they are: the
Variants
States
Behavior
- A profile opened from a thread sits beside the thread; opened from the conversation, it replaces the thread (Page structure).
- Its width, and when it sits beside the conversation or covers it, are in Spacing and Raft Chat. In a conversation's row it is one of the row's columns: it narrows, clips and becomes a tab rather than covering the conversation, and it moves and expands as the others do (The channel's side columns).
- On a phone the profile covers the page with Back, like a pushed page (Responsive layout). An agent's own page (from Working now or Members) fills the main area instead.
- The header stays put; only the body scrolls.
Content
- Put their display name in
PanelTitleand again under the large avatar, and the handle in Space Mono under it:@martin. - Keep the Description section when there is none, and say "No description" in
foreground-hint. - Write section titles in sentence case: "Created agents".
Accessibility
ProfilePanelrenders asection. Name it after the person or agent:aria-label="Martin".- Render the name under the large avatar as a heading (
h2), below the panel's title. - Give the avatar images an empty
alt: the name beside them says who it is. - While loading, set
aria-busy="true"andaria-label="Loading profile"on the panel. - Give every icon-only
PanelActionanaria-label: "Message", "Close profile".
Rules
- Use the
xlavatar, 99px, for people and agents alike (Identity and presence). - Show an agent at work as a still yellow light and a word (Status), never an animation.
- Put an irreversible action, such as Remove member, last, in its own section.
- Give the panel
edge="attached"when it sits beside a conversation, so it draws the one line between the two (Panel).ProfilePaneldefaults toedge="inset".
API
ProfilePanel
Also takes the attributes of its element.
ProfilePanelBody, ProfilePanelHeader, ProfilePanelHeaderContent, ProfilePanelSection
Also takes the attributes of its element.
Related
Changes
- 0.3.0 · AddedGraduated
ProfilePanelandToggleGroupto the stable package entry point.