ToolPanel

A workspace's rail of labelled tools at the right edge, and the panel each one opens beside it. One panel is open at a time; the panel has a heading, a close button and its own scroll. Taken from provider's in-visit screen.

Spec · from metadata

When to use

  • •A viewport-height workspace (a live visit) with several reference views the person flips between while the main pane stays in place: chat, summary, past visits, diagnoses
  • •Views that sit beside the work rather than over it, so the person can read one while typing in the main pane

When not to use

  • •Supplementary content over an ordinary page — use Sheet, which overlays and traps focus
  • •Page navigation — the rail switches views inside one screen; moving between pages is AppSidebar's job
  • •One or two views — a Tabs row or a single toggleable Card says the same thing with less chrome
  • •A page that scrolls the window. The panel and rail are built to sit in a pane of fixed height (see the viewport-height workspace pattern in helix-app-layouts)

Anti-patterns

Avoid<ToolPanelRail aria-label="Visit side panel">
  <Button size="icon" tooltip="Chat"><MessageSquare /></Button>
</ToolPanelRail>
Prefer<ToolPanelRail aria-label="Visit side panel">
  <ToolPanelTrigger value="chat" icon={<MessageSquare />}>Chat</ToolPanelTrigger>
</ToolPanelRail>

An icon-only rail makes the person hover each tool to find the one they want, mid-visit. ToolPanelTrigger shows the label and carries the pressed state, so the open tool is announced and visible.

Avoid<Sheet open={view === "chat"}>…</Sheet>
Prefer<ToolPanel value={view} onValueChange={setView}>…</ToolPanel>

A Sheet covers the work and traps focus. In a workspace the person reads the panel while typing in the main pane, so it has to sit beside it.

Accessibility

  • Required ARIAaria-label on ToolPanelRailaria-pressed on each trigger (from Toggle)
  • Screen readerThe rail is a nav landmark named by its aria-label. Each tool is a toggle button whose name is its visible label, with aria-pressed. The open panel is a region named by its h2. A count badge is read as "N new".

Token bindings

TokenCategoryUsage
bg-cardcolorRail and panel surface
text-muted-foregroundcolorTools that are not open
text-foregroundcolorThe open tool, also semibold
w-20 / w-125spacingRail (80px) and panel (500px) widths
Recent changes
  • new

    ToolPanel, and a nav that a workspace can close

    2026-11-05

[!NOTE] Compound component — an opinionated composition of Helix primitives. Composes: Toggle, Badge, Button.

Import

import { ToolPanel, ToolPanelContent, ToolPanelRail, ToolPanelTrigger } from "@timelycare/helix-ui"

Usage

const [view, setView] = useState<string | null>("chat")

<ToolPanel value={view} onValueChange={setView}>
  <ToolPanelContent value="chat" title="Chat">…</ToolPanelContent>
  <ToolPanelContent value="summary" title="Visit summary">…</ToolPanelContent>
  <ToolPanelRail aria-label="Visit side panel">
    <ToolPanelTrigger value="chat" icon={<MessageSquare />} count={2}>Chat</ToolPanelTrigger>
    <ToolPanelTrigger value="summary" icon={<UserRound />}>Summary</ToolPanelTrigger>
  </ToolPanelRail>
</ToolPanel>

TimelyCare Design System

v0.14.0