Raft Design System

Components · Layout

Panel

A column of the desktop main area with a panel header (44px on a desktop, 56px on a phone) and its own scrolling content; its header is also the top bar of a phone's pushed pages.

StableAlso called NavBar, Top bar, Panel header
import { Panel } from "@botiverse/raft-ui";

A panel is one column of the desktop main area: a panel header, then content that scrolls inside the column. Every column uses the same header, whether it holds a conversation, a thread, a side panel or a drawer's content. On a phone, PanelHeader is the top bar of a pushed page.

panel/panel

When to use

SituationUse
A column of the desktop main area, or a side panel beside it (a thread, a profile)Panel
A channel's tasks and filesSide sections in columns right of the conversation's panel, not a Panel (Page structure)
A conversation: header, tabs, messages and composerConversationPanel, built on Panel
A thread beside a conversationThreadPanel
The top bar of a phone's pushed pagePanelHeader
The list of what a destination contains, next to the railSidebar
Details or settings that slide in over the pageDrawer

How the regions of a screen are arranged, and when a side panel sits beside the main area or covers it, is in Page structure and Responsive layout.

Anatomy

  • Panel: the column. edge="attached" draws a line-seam on its left edge, for a side panel next to a conversation; edge="inset" draws none.
  • PanelHeader: the header, 44px on a desktop, 48px by touch from 768px and 56px on a phone, with a line-seam under it. Required. From 768px it is one line, with a mouse or by touch: a PanelMeta follows the title on its line and gives up its room first (on a phone it goes under the title). A touch tablet used to stack them while a mouse got one line, so the same page looked different on an iPad and a laptop, and an app began overriding it page by page (xxchan, Kirby, 2026-11-09, #proj-workspace:dc3c9fc9). With a mouse the icon tile and the actions are 28px (bar-button-size) at radius-chip.
    • PanelHeaderIcon: the location tile of a place, or the avatar of a person. Optional.
    • PanelHeaderContent: holds PanelHeading and PanelMeta.
    • PanelHeading: the PanelTitle, followed by any PanelStatus (a tag such as Archived) or PanelActivity (a live status of the one thing the panel shows, such as an agent's presence in its profile, wrapping a Status; not what is happening in a place, see Content).
    • PanelMeta: one line of description under the title.
    • PanelActions: the trailing PanelAction and PanelToggleAction buttons, and any PanelSplitAction.
  • PanelSplitAction, with PanelSplitActionMain (or PanelSplitActionToggle) and PanelSplitActionMenu: one header action with a menu beside it, such as Comment and its ▾ (Split actions). Work in progress: import it from @botiverse/raft-ui/wip.
  • PanelTitleTrigger: the title as a button with a chevron, which opens a menu of what the panel can show; it takes PanelTitle's place in PanelHeading (A title that switches). Work in progress: import it from @botiverse/raft-ui/wip.
  • PanelSectionHeader: the same bar for a section-level view. On a phone it sits on the frame.
  • PanelHeaderRoot: the bare header-height bar both headers are built on, for a header with its own layout.
  • PanelNotice, with PanelNoticeContent and PanelNoticeActions: a full-width strip under the header for a problem in this panel. When to use it instead of a banner is in Banner. The intent's icon placed before PanelNoticeContent leads its first line; while something is still pending, a Spinner in a status="info" notice takes the icon's place, centered on the first line in the icon's 16px column, as in Banner; never a status light to say what kind of notice it is, since a status light keeps its own meanings (Status) (A mark that leads text).
  • PanelBody, PanelScrollViewport and PanelScrollContent: the content and its single scroll container. PanelScrollViewport is a ScrollArea that stops a scroll at its end (overscroll="contain"); its ref and props are the scrolling element's, and it takes ScrollArea's options.
  • PanelSection: a block of content with a hairline above it.
  • PanelFooter: the bottom action area, padded for the safe area.
conversation-panel/compositions/conversation-panel-header

Variants

HeaderUse for
PanelHeaderEvery desktop panel header; the white top bar of a phone's pushed page
PanelSectionHeaderA section-level view. On a phone it sits on layer-frame with foreground-on-frame text, and hides PanelHeaderIcon

A phone's pushed page has a white top bar, and its location tile stays a yellow sticker (Open questions).

States

  • A pressed PanelToggleAction, or a PanelAction with aria-pressed, is a yellow sticker: it marks the side panel that is open.
  • Other states follow States.

Behavior

  • The header stays put; only PanelScrollViewport scrolls.
  • The title and the description truncate with an ellipsis on one line each, and the head always fits its column (A head fits its column).
  • On a phone the header sticks to the top of the page.
  • When the window is shorter than 600px, the header shrinks with every other header (Spacing).
  • Give Back activateOnTouchEnd: on a touch screen it then goes back when the finger lifts, so a tap that stops a scrolling page still goes back (Switching on finger lift). DialogSheetBack sets it. Leave it off the header's other actions: they change things, and the rule is for navigation.

Split actions

An action that also has a short menu of related choices, such as Comment and its ▾ (Show all comments), is one control in two parts: PanelSplitAction holds the action, a PanelSplitActionMain (a button) or a PanelSplitActionToggle (an action that stays on, such as commenting), and a PanelSplitActionMenu, the narrow chevron that opens the menu. Render the menu part as the trigger of a DropdownMenu or a Popover: <DropdownMenuTrigger render={<PanelSplitActionMenu aria-label="Comment options" />} />. A split with a frame, a primary or default Button and its ▾, is ButtonSplit (Split buttons).

panel/compositions/panel-split-action
  • One shape. The two parts touch, with no gap and no divider, and together are one radius-control shape: the main part is a panel action's square, rounded only on its start side; the menu part is 20px wide on a desktop (with a 16px chevron), rounded only on its end side, as tall as the main part. Two separate buttons, each with its own square hover, read as two unrelated actions.
  • One hover, two tiers. The part under the pointer takes the medium tier, fill-medium, as every small control does; the other part takes the subtle tier, fill-subtle, one step lighter, so the whole shape lights up and the darker half says which part a click acts on (Joined frameless parts hover as one control). The tint replaces a divider: a hairline would be a second signal on the same surface, and at rest both parts are frameless, so the icon and the chevron side by side already read as one control.
  • Press lays fill-medium on the pressed part.
  • Pressed toggle. PanelSplitActionToggle is a Base UI Toggle and takes the yellow sticker of a pressed PanelToggleAction. While it is pressed the menu part keeps fill-subtle, so the sticker and the chevron still read as one control. Like every selected item, the pressed main part doesn't answer hover.
  • Menu open. The menu part keeps fill-medium while its menu is open (data-popup-open), and the main part fill-subtle, the way a row with its menu open keeps its hover (States).
  • Focus. Each part is its own button with its own focus ring, drawn above its neighbour: Tab reaches the main part, then the menu part.
  • Disabled. Either part can be disabled on its own: it turns foreground-disabled and neither hovers nor tints the other part.
  • Touch. On a phone and on a touch screen the main part is the 44px button and the menu part is drawn 24px wide; its hit area extends 20px past its end, and the part keeps that space free, so it is 44px by 44px without overlapping the next action (Hit targets). On a desktop its hit area overhangs toward the next action by the control's overhang, as a panel action's does.
  • Name the group (aria-label on PanelSplitAction, which is role="group") and each part, and don't give the group its main part's name: the group "Comments", the main part "Comment", the menu part "Comment options".
  • Don't put a split action at the end of PanelActions: it declares no icon inset, so it ends on the margin by its shape instead of by its icon box. Keep a panel action (Close) after it.

A title that switches

When a panel shows one of a few things of the same kind and the person moves between them without leaving the panel, such as the Artifacts opened lately beside a conversation, the title is the control that switches: a PanelTitleTrigger in PanelHeading where PanelTitle would be, as the trigger of a DropdownMenu: <DropdownMenuTrigger render={<PanelTitleTrigger />}>Q3 launch plan</DropdownMenuTrigger>. Picking a row swaps what the panel shows; the panel, its place in the row and its actions stay (slock's Artifact viewer, 2026-11-14, #proj-workspace:#291).

panel/compositions/panel-title-trigger
  • Only for what the panel shows. Don't put actions on the thing shown in the title's menu: they are the panel's actions and its ⋯, where every other panel has them. Don't use it to go to another kind of place: that is navigation, and the panel would no longer be the one the title named. Don't put a property of the thing in it, such as its version: that stays a control of its own in a PanelStatus after the title, so the title's menu answers one question, which thing.
  • With one thing to show, use PanelTitle. A chevron that opens a list of one row promises a choice that isn't there. The first letter of the title is at the same place in both, so a panel that gains or loses its second thing doesn't move its title: the trigger pulls its start back by its own inset. Don't add a margin or a wrapper to place it.
  • The menu is a radio group. Its rows are DropdownMenuRadioItems in a DropdownMenuRadioGroup, the one shown checked, the most recent first, and few: slock lists 5. A longer list needs a search, which a title's menu has no room for; a last row after a DropdownMenuSeparator may open the full list in its own place (All Artifacts). Leave the menu aligned to the trigger's start, DropdownMenu's default, so its rows begin under the title.
  • The chevron says the title opens something. It is chevron-down at 14px in foreground-muted, 4px after the title, and the part draws it: don't pass one. A title too long for its room truncates; the chevron never does, because without it the title reads as plain text. The trigger shrinks with PanelHeading, so the head still fits its column (A head fits its column).
  • Hover, press and open lay fill-medium on the trigger, as on a PanelAction; it keeps it while its menu is open (data-popup-open).
  • Sizes. On a desktop it is the bar button's 28px tall with its 44px hit area, and the head stays 44px. On a touch screen from 768px, where the head is one line, it is the 36px bar button in the 48px head. On a phone the head is two lines, the title and the PanelMeta under it, and a 44px trigger pushes the PanelMeta onto the head's bottom edge: there the trigger is drawn as tall as the title's line (22px), and its hit area reaches 44px by extending 11px above and below it, so the head stays 56px and both lines stay where a plain title puts them (Hit targets).
  • In a head that measures its title. On a desktop the trigger takes 23px more room than a PanelTitle with the same text: the 4px gap, the 14px chevron and its 5px end inset (its start inset is pulled back). Where your code works out what folds from the title's width, add PANEL_TITLE_TRIGGER_EXTRA_WIDTH (23) from @botiverse/raft-ui/wip, not a number of your own. By touch the end inset is 9.5px, so it is 27.5px.

Phone top bars

The structure of a phone's top bars (the navigation row of a top-level page, Back and up to 2 icon buttons on a pushed page) is in Page structure. The top bar also follows these rules:

  • On a top-level page, put the page name in the 56px row in text-headline, with no large title and no icon tile before it (Page structure).
  • Don't put New or Search buttons in the top bar of a top-level page: search is the Search tab (Navigation).
  • Make the bell the entry to the notification center, with a pink pixel when something is new. On a phone it is only in the top bar of the first top-level page (Page structure).
  • Use the arrow-left icon for Back, not a chevron: its ink fills the icon box like other icons, so it mirrors the button at the other end without being shifted (Alignment).

Content

  • Name the place, the person or the view in PanelTitle.
  • Put a location tile (IconTile) in PanelHeaderIcon for a place, and the person's avatar for a person. Other pages have no icon: their PanelMeta says where they belong, such as the channel a thread is in.
  • Keep the icon with the title it belongs to: the icon says what the title names, so nothing goes between them, neither a trail of the places above nor a tag. A computer's head is its device icon, then its name.
  • Say in PanelMeta where or what this is: a description, the place a thread is in, counts ("5 members"). What is happening right now goes where it happens, not in the header: who is working in a channel floats above its composer (Working agents). Set numbers and IDs in Space Mono (Typography).
  • Put a tag on the name (Experimental, Archived, Deleted) in PanelHeading as a PanelStatus, never in PanelMeta: the description truncates, and truncation cuts off the tag's edge.

Accessibility

  • Panel renders a section. Name it with aria-label or aria-labelledby when several panels sit side by side.
  • PanelTitle renders a div. Render it as the page's heading (render={<h1 />}, or h2 inside a page that has one).
  • PanelAction wraps the Base UI Button and always renders type="button". PanelToggleAction wraps the Base UI Toggle, which sets aria-pressed.
  • Give every icon-only PanelAction and PanelToggleAction an aria-label: "Back", "Channel details", "Close tasks".
  • PanelSplitAction is a role="group"; its two parts are buttons, and the menu part takes aria-haspopup and aria-expanded from the menu trigger it renders as.
  • PanelTitleTrigger is a Base UI Button with type="button"; its name is the title it holds, and the chevron is hidden from assistive technology. It takes aria-haspopup and aria-expanded from the menu trigger it renders as. Give the menu an aria-label that says what it lists ("Recent Artifacts"): the trigger's name is only the one shown. Where the title is the page's heading, put the trigger inside the heading element, not render on the trigger, so it stays a button: <h2 className="flex min-w-0">, then the DropdownMenuTrigger in it. flex keeps the heading's own line height out of the head, and min-w-0 lets the title truncate.
  • Give an icon-only PanelStatus (a muted bell) an accessible name.

Rules

  • Use this header in every panel: conversation, thread, side panel and drawer. Don't give one panel its own header or button sizes.
  • Use PanelAction for every icon button in a header (a panel's, a sidebar's, a drawer's, a thread's), never a Button at icon-lg (on a phone a Button at icon-lg is the same 44px and may stand in, as a search panel's Back does): the header sizes its actions through bar-button-size, 28px at radius-chip with an 18px icon and a 44px hit area on desktop (from 768px with a mouse or trackpad), 4px apart, the size of the header's icon tile; 36px with a 20px icon (bar-icon-size), 2px apart, by touch from 768px, so they sit in the 48px head with 6px above and below as the top bar's items do (artin, #wg-mobile-sync:#265); 44px with a 22px icon, 2px apart, on a phone. Every size keeps a 44px hit area. A Button would keep the 34px control and stand out beside 28px actions. A 44px button next to a 17px title looks heavy on desktop; a finger needs 44px.
  • When the header's icon is a person's or an agent's avatar (PanelHeaderIcon with an avatar), it keeps the 27px sm avatar, 1px less than the 28px tile: avatars come in 8n + 3 sizes.
  • Put Back first in the header and the actions last, in PanelActions: the header pulls its first and last button out so their icon boxes, not the buttons, sit on the content margin, 16px with a mouse on a desktop, 20px on a touch screen in the desktop layout, 16px on a phone (20px in a column of list cells, 16px with a mouse), at every button size (Alignment). Don't add margins of your own to move an edge button. The margin is --column-margin (16px on a phone, 20px from 768px on a touch screen, the page inset, 16px, with a mouse; stdrc, 2026-11-05); a column of list cells sets it to 20px at every width so its head starts where its rows' content does (Lists). PanelNotice and the panel footer pad by it too. To give a column another margin, set [--column-margin:…] on the column; a px-* on the head replaces the variable at every width, so the phone's 16px and a list column's 20px no longer apply to it. Keep only PanelActions in PanelActions: the group declares their inset, so an action hidden at some width (a thread's Close below 1024px) leaves the next one on the edge. A frameless Button at icon-md or icon-lg as the header's first or last child is pulled the same way; a filled one ends its shape on the margin.
  • Order the actions the same way in every header: the panel's own actions shown as buttons, then the overflow menu (⋯), then the window controls, Expand and Close, side by side. ⋯ is always the last of the panel's own actions, because it holds what didn't fit, so whatever is shown comes before it; that is where people look for "more" in any app (the platform convention, as in Material's top app bar and Apple's toolbars). Expand and Close act on the region itself rather than on what is in it: one resizes it, the other leaves it. So they sit side by side at the outer edge, apart from the panel's own actions, as a window's controls do in its title bar and as Back does at the other end (stdrc, 2026-11-03, #proj-raft-ui:#189). Among the panel's own buttons, put the ones that change the view (Open in new page) first, then the ones that act on the content.
  • Give a PanelStatus its own cell on the title's line, and center it by its shape. Don't nudge it: the title's letters already sit on the line's center, so a 1px shift makes it sit high.
  • Open a side panel from the header with a PanelToggleAction: pressing it again closes the panel.
  • Close a side panel (channel details, a profile, a thread) on Escape only while focus is inside it, one step per press: first empty a search field that has text, as FitToolbarSearch does; then cancel or collapse what is open in it (an inline editor, a page within the panel, an expanded column, which goes back to the width it had; a menu or popover takes its own Escape); then close the panel and give focus back to what opened it (the header's toggle, the channel's name). With focus anywhere else, Escape leaves the panel alone: the panel isn't modal, so the key belongs to what has focus. Escape never drops typed text unasked: an edit with changes goes to the panel's close, which asks first, as Close does (Kirby and Jasper, 2026-11-11).
  • Show Expand and its Restore (maximize-2 / minimize-2, a PanelToggleAction, pressed while expanded) as its own header button, never in the overflow menu (⋯). It changes the view itself rather than the thing in it, and people reach for it often, so it is one press away, not two (stdrc, 2026-10-31). It is a window control: it sits right before Close, after ⋯ (see the order above), and ends the head where there is no Close (the conversation's). Open in new page (arrow-up-right, a PanelAction) is one of the panel's own actions and comes first among them, before ⋯: it opens the thing somewhere else rather than resizing this region. Where a head runs out of room it folds into ⋯ like the panel's other own actions, the last of them to go (A head fits its column); Expand never folds. A column at 160px has no room for it beside the title, ⋯, Expand and Close, so it folds, after the other own actions, rather than keep the head from fitting (decided with stdrc's approval of the #189 layout preview, 2026-11-04, #proj-raft-ui:aedc53e1).
  • In a conversation's row, give every column's head Expand: the conversation's, the thread's, Tasks', Files', the Artifact's and every profile's, but not the channel details' (below); on the Tasks page, whose row works the same way, the list's and the open task's (The Tasks page's row). Expanded, the column fills the row and every other column stays at 160px, clipped: the rest of the row stays in view as narrow strips (stdrc, 2026-11-04). Expand again, or Escape, puts every column back at the exact width it had. One column is expanded at a time (The channel's side columns). Where the column stacks several regions (the thread over Tasks, Tasks over Files), the one expanded also fills the column's height, and the others in it show their heads alone, in their order: the person asked for that region, and the heads keep the rest one press away. While it lasts, those heads have no fold chevron and the stack no split to drag; Expand again, or Escape, puts every height and every fold back as it was (stdrc, 2026-11-04, #proj-raft-ui:aedc53e1). Show Expand only when there is something to expand into. When the row has one column, hide it, don't disable it: a conversation open alone, or a thread folded over the conversation with no column beside it. The column that is expanded always shows its Restore, so it can come back. A button that can't do anything in this layout only takes room and asks to be tried (stdrc, 2026-11-03, #proj-raft-ui:#189). On a phone, where the panel already fills the screen, there is nothing to expand either: leave Expand out, and keep Open in new page in ⋯.
  • Give the channel details' column no Expand. Its content is a description and settings rows, which read the same at 400px as across the row, so a whole-row view would only show the same rows with more empty space beside them, and a button that changes nothing worth having only takes room in the head. It is still a column like the others: it narrows, clips, becomes a tab and moves like them (stdrc, 2026-11-10, #proj-raft-ui:dae8db07; Channel).
  • A head fits its column, whatever its width, down to a column's 160px (stdrc, 2026-11-03, #proj-raft-ui:#189). The title and the description ellipsize, each keeping at least one letter and its ellipsis (28px); they never drop to a bare letter or wrap. Where the buttons would leave the title less than 56px (the prototype's value, #189), the column's own actions fold into ⋯, the last first; ⋯, Expand and Close never fold, and ⋯ shows only with something in it. In a column clipped under its content's minimum, the head's edge margins tighten to 12px and the gap before its buttons to 4px, so its title keeps its letter at 160px. A head whose title room holds the row's tabs gives them 120px (the prototype's value) before its actions fold. A profile's head drops its avatar under 240px, and the Artifact's head hides its version tag where its title has less than 96px; the version stays in ⋯ › Version history. The head itself is never clipped: only what is under it is.
  • In a sheet, a panel paints the sheet's surface. Inside a DrawerContent, or a DialogSheetContent on a phone, Panel, PanelHeader and PanelFooter paint layer-popover, the sheet's own surface, instead of their column's layer-canvas; the line-seam under PanelHeader stays. A sheet is one surface from the grab handle down (Drawer), and canvas is darker than popover in dark mode, so a sheet's head read as a band between the handle and the list (artin, 2026-11-25, #proj-workspace:f6de4a2b; slock #16883). The panel does it by itself: don't pass a class for it. A surface of your own inside the panel (a list on layer-card) is yours to drop in a sheet. Beside the page nothing changes.
    • A conversation or a thread stays on layer-canvas in a sheet, and only its head (PanelHeader, ThreadPanelHeader) takes the sheet's surface: ConversationPanelRoot, ConversationPanelFooter, ThreadPanelRoot and ThreadPanelFooter keep canvas, since their messages, cards and composer are drawn for canvas, and a composer band of popover under a canvas list would be a second band (Jasper, 2026-11-25, #proj-raft-ui:#308).
  • Give a side panel next to a conversation edge="attached", so it draws the one line between the two (Page structure).

API

Panel

PropTypeDefault
edgePanelEdge
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.

PanelAction

PropTypeDefault
activateOnTouchEndActivate when the finger lifts instead of on the click after it, so a tap that stops a scrolling page still acts. Give it to Back, the header's navigation; not to actions that change things (design/patterns/navigation.md#switching-on-finger-lift).booleanfalse
focusableWhenDisabledWhether the button should be focusable when disabled.booleanfalse
nativeButtonWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).booleantrue
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.

PanelActions, PanelActivity, PanelBody, PanelFooter, PanelHeader, PanelHeaderContent, PanelHeaderIcon, PanelHeaderRoot, PanelHeading

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.

PanelMeta

PropTypeDefault
size"sm" | "md""sm"
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.

PanelNotice

PropTypeDefault
statusThe tint: warning for something to fix (the default), destructive only for what cannot be undone.PanelNoticeStatus"warning"
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.

PanelNoticeActions, PanelNoticeContent, PanelScrollContent

Trailing controls (copy, a link, ×), centred on the first text line.
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.

PanelScrollViewport

The panel's one scroll container, a ScrollArea: its overlay scrollbar takes no room and looks the same on every platform, and a scroll that reaches the end stops there (`overscroll="contain"`). `ref`, `className`, `render` and the native props are the scrolling element's; ScrollArea's options pass through.
PropTypeDefault
actionsRefMethods to scroll from code that the container doesn't have natively.((instance: ScrollAreaActions | null) => void | (() => void | { [UNDEFINED_VOID_ONLY]: never; }) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<ScrollAreaActions | null>
childrenThe scrolling content, in ScrollArea's own container.ReactNode
contentClassNameClass of a content element around `children`, inside the container: put padding and the content's own layout (grid, flex, `gap`, `stack-y-*`) here, so the scrollbars stay at the edges and the gutters layer is never one of the laid-out children. Only with it, `contentStyle` or `fade` is there one.string
contentRefAn element whose size is the content's, watched for size changes (such as a hidden mirror of a textarea's text). Without it each element child of the container is watched, and children added or removed.RefObject<HTMLElement | null>
contentStyleStyle of the content element; renders it, as `contentClassName` does.CSSProperties
fadeFade the content out toward an edge that has more past it. The scrollbars don't fade.boolean
hideDelayHow long the scrollbars stay after scrolling stops, in ms. At least 100 with `trigger="scroll"`.number
onEdgeChangeCalled when the area reaches or leaves an edge, and after mounting when the content overflows.(edges: ScrollAreaEdges) => void
onScrollThe container's scroll events.UIEventHandler<HTMLDivElement>
orientationThe directions the area scrolls in. Content too wide for a vertical area is cut off.ScrollAreaOrientation
overscrollWhat a scroll that reaches the end does: stop there with no bounce (`none`, the default), stop there but let Mac trackpads and iOS bounce the area (`contain`), or carry on to the page behind (`auto`, which leaves the container's own `overscroll-behavior` alone). Only in the directions the area overflows right now.ScrollAreaOverscroll
railInsetRoom in px the scrollbars keep clear at each end, such as a sticky header's height, so they don't run over it. Also settable in CSS, on the root: `--r-scroll-area-rail-inset-{top,bottom,left,right}`, which don't inherit.ScrollAreaRailInset
renderAnother element in place of ScrollArea's own `<div>`, as the container (an element or a function that gets the props). It must hold children: the gutters are its first child.ReactElement | ((props, state) => ReactElement)
sizeThumb thickness: `small` is 5px, `medium` 7px; both grow while pointed at or dragged.ScrollAreaSize
tabIndexThe container's: by default `0` while there is something to scroll.number
triggerWhen the scrollbars show. They always show while scrolling or dragging.ScrollAreaTrigger

Also takes the attributes of its element.

PanelSection, PanelSectionHeader, PanelStatus, PanelTitle

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.

PanelToggleAction

PropTypeDefault
defaultPressedWhether the toggle button is currently pressed. This is the uncontrolled counterpart of `pressed`.booleanfalse
disabledWhether the component should ignore user interaction.booleanfalse
nativeButtonWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).booleantrue
onPressedChangeCallback fired when the pressed state is changed.(pressed: boolean, eventDetails: BaseToggle.ChangeEventDetails) => void
pressedWhether the toggle button is currently pressed. This is the controlled counterpart of `defaultPressed`.boolean
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)
valueA unique string that identifies the toggle when used inside a toggle group.string

Also takes the attributes of its element.

PanelSplitAction

ExperimentalOne header action with a menu beside it, such as Comment and its ▾: a `PanelSplitActionMain` (or `PanelSplitActionToggle`), then a `PanelSplitActionMenu` as the trigger of a DropdownMenu or a Popover. The two parts read as one control.

Takes the attributes of its element.

PanelSplitActionMain, PanelSplitActionMenu

ExperimentalThe primary action of a split action, a panel action's square: a Base UI Button. For an action that stays on, use `PanelSplitActionToggle`.
PropTypeDefault
focusableWhenDisabledWhether the button should be focusable when disabled.booleanfalse
nativeButtonWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).booleantrue
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.

PanelSplitActionToggle

ExperimentalThe primary action of a split action when it turns something on, such as commenting: a Base UI Toggle (`aria-pressed`), the yellow sticker while pressed, like PanelToggleAction.
PropTypeDefault
defaultPressedWhether the toggle button is currently pressed. This is the uncontrolled counterpart of `pressed`.booleanfalse
disabledWhether the component should ignore user interaction.booleanfalse
nativeButtonWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).booleantrue
onPressedChangeCallback fired when the pressed state is changed.(pressed: boolean, eventDetails: BaseToggle.ChangeEventDetails) => void
pressedWhether the toggle button is currently pressed. This is the controlled counterpart of `defaultPressed`.boolean
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)
valueA unique string that identifies the toggle when used inside a toggle group.string

Also takes the attributes of its element.

PanelTitleTrigger

ExperimentalA panel's title that opens a menu of what the panel can show, such as the Artifacts opened lately: the title, then a chevron. Put it in `PanelHeading` where `PanelTitle` would be, as the trigger of a DropdownMenu: `<DropdownMenuTrigger render={<PanelTitleTrigger />}>Q3 launch plan</DropdownMenuTrigger>`. Its title starts where a `PanelTitle`'s does, and a long one truncates before the chevron.
PropTypeDefault
focusableWhenDisabledWhether the button should be focusable when disabled.booleanfalse
nativeButtonWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).booleantrue
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.109.1 · Design SystemA notice under a panel header shows a reason from the system in full: the sentence written for it stays at most two lines, and a reason the system gives (why something failed) wraps under it in the same PanelNoticeContent, unclamped. Such notices stay PanelNotice, never Banner. Components: PanelNotice.
  • 0.105.1 · FixedPanel, PanelHeader, PanelFooter: inside a sheet (DrawerContent, or DialogSheetContent on a phone) they paint the sheet's layer-popover instead of their column's layer-canvas, so the sheet is one surface from the grab handle down; PanelHeader keeps its line-seam. ConversationPanelRoot, ConversationPanelFooter, ThreadPanelRoot and ThreadPanelFooter keep layer-canvas in a sheet, so a conversation or a thread in a sheet changes only in its head (PanelHeader, ThreadPanelHeader). Beside the page they are unchanged.
  • 0.103.4 · Design SystemWide touch heads ([Spacing › Heights](https://raft-design.botiverse.build/foundations/spacing/#heights)): by touch from 768px (a tablet, an unfolded foldable, a phone held sideways that wide) a head is 48px, not the phone's 56px, and its bar buttons are 36px with a 20px icon; their hit area still reaches 44px. New token bar-icon-size, and a fourth token context, wideTouch. Changed in this release: PanelAction, PanelSplitAction, PanelTitleTrigger, SelectionToolbar, Drawer's close button, and every head that reads header-height.
  • 0.100.0 · AddedPanelTitleTrigger, a panel title that opens a menu of what the panel can show ([Panel › A title that switches](https://raft-design.botiverse.build/components/panel/#a-title-that-switches)). Work in progress, from @botiverse/raft-ui/wip. Put it in PanelHeading where PanelTitle would be, as the trigger of a DropdownMenu: <DropdownMenuTrigger render={<PanelTitleTrigger />}>Q3 launch plan</DropdownMenuTrigger>. It is a Base UI Button (data-slot="panel-title-trigger") that draws its children in PanelTitle's type, truncating, then a 14px chevron-down in foreground-muted that never truncates. It takes fill-medium on hover, on press and while its menu is open, and pulls its start back by its own inset, so the title's first letter is where a plain PanelTitle puts it and the caller writes no margin and no wrapper. On a desktop it is the 28px bar button with a 44px hit area; on a touch screen from 768px the 44px bar button; on a phone it is as tall as the title's line and its hit area reaches 44px above and below, so the two-line head stays 56px. PANEL_TITLE_TRIGGER_EXTRA_WIDTH (23) is how much more room it takes than a plain title on a desktop, for a head that measures its title to decide what folds. In a PanelSectionHeader on a phone it takes the frame's text and hover colors, as PanelTitle and PanelAction do.
  • 0.96.0 · Changedraft-ui/prefer-scroll-area finds native scrollers it used to miss, and its message says what to write for the direction and the element ([Use raft-ui › Lint rules](https://raft-design.botiverse.build/about/use-raft-ui/#lint-rules)). It now reads a native-scrolling class in a list joined into a const ([…].join(" ")), in a const built from another const, in a member of an object or variant map of the same file that is read as a class (cls.body; every member when read as VARIANTS[kind]), in an argument of one call that isn't a class helper inside a class attribute (className={wrap("overflow-y-auto")}) or of the call a JSX spread spreads ({...guard("overflow-x-auto")}), in a function that returns the class (className={(state) => …}), in the default of a parameter with a class name ({ className = "overflow-y-auto" }), and in a …Class, classNames or …ClassNames prop; a style kept in a const object of the same file (style={styles.pre}) or under a style key ({...{ style: { overflowY: "auto" } }}), the value overlay and two values (overflow: "hidden auto"); and the arbitrary values overflow-[auto], overflow-y-[scroll], overflow-[hidden_auto] and [overflow:overlay]. A const is resolved by scope, so a parameter of the same name is not the const. The message gives the replacement: <ScrollArea className="…sizing…" contentClassName="…layout, gap, padding…"> for overflow-y-*, with orientation="horizontal" for overflow-x-*, and with orientation="both" for overflow-auto, overflow-scroll or x and y classes together, since a vertical area cuts off content wider than itself. On a <textarea> it names ScrollAreaTextarea; on a <pre>, <html>, <body> or <iframe> it gives no replacement, only the exception comment; in a classNames object it names useScrollAreaContainer and ScrollAreaGutters; on a ScrollArea or PanelScrollViewport element's own class it says to remove the class, and names no exception. Each message ends with the address of ScrollArea's page as Markdown. The exception comment at the end of a line of code now covers that line only: it also covered the line after it, so a comment after one string of a class list silenced the next string.
  • 0.80.0 · ChangedA panel head is one line from 768px by touch too: PanelHeaderContent puts the PanelMeta after the title on its line from 768px at any pointer, where it used to do so only with a mouse; a phone still puts it under the title.
  • 0.73.0 · ChangedEvery region that scrolls is a ScrollArea: PanelScrollViewport, ActivityInboxViewport, SearchShellViewport, NotificationCenterScroller, FilesViewport, TasksPanelViewport, ChoiceList's scroller, MobileNavServerPopoverList, ComposerSuggestionList, AnnouncementDialogBody, MessageActionCardScopeListViewport and DialogNav show ScrollArea's overlay scrollbar instead of the platform's. Native scrolling stays only in the places scroll-area.md lists, each with its reason, and a test fails on any other.
  • 0.52.0 · AddedPanelSplitAction (wip): an action and its menu drawn as one control (PanelSplitActionMain, PanelSplitActionToggle, PanelSplitActionMenu), e.g. Comment and its ▾. The menu part is narrow and gets a 44×44 target on touch.