Panel Header
The header of a layered panel, drawer, sheet or dialog: a 40 px icon tile, a 16 px title with a muted line under it, a round close button, 16 / 24 padding and a rule underneath.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { PanelHeader } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
Jane Citizen
Individual · Client
Props
title
subtitle
icon
tone
onClose
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Use it at the top of a layered panel or sheet you build yourself, and pass onClose so there is a visible way out besides Escape. |
| Do | Pass titleId and point the panel's aria-labelledby at it, so a screen reader names the panel by its title. |
| Do | Set closeLabel when panels stack, like "Close contact" over an opportunity, so each close button has a unique name. |
| Don't | Use it in a Drawer or Dialog. Use DrawerHeader or DialogHeader, which wire the title and close button to the popup itself. |
| Don't | Use it to head a section inside the panel. Use SectionHeader, a step down in size, so the panel's own title stays the strongest. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| icon | ReactNode | — | The 20 px icon in the 40 px tile on the left. |
| tone | Exclude<Tone, "default" | "plum"> | "neutral" | "info" | The icon tile's colour, as IconTile. |
| title * | ReactNode | — | The panel's name. |
| subtitle | ReactNode | — | One muted line straight under the title. |
| onClose | () => void | — | Shows the round close button and runs when it's pressed. |
| closeLabel | string | "Close" | Names the close button when "Close" isn't enough. |
| titleId | string | — | An id for the title, so a dialog or drawer can name itself with aria-labelledby. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
Code
What the playground shows, ready to copy.
import { PanelHeader, PlusIcon } from "@leap-crm/design-system";
<PanelHeader
title="Jane Citizen"
subtitle="Individual · Client"
icon={<PlusIcon />}
/>Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| EnterSpace | Close the panel, with focus on its close button. |







