Section Header

Heads a section: a 32 px icon tile, a 14 px title with a muted line straight under it, 10 px apart, and optional controls on the right.

BetaReady to use. Its API can still change in a minor release; the changelog says when.

import { SectionHeader } from "@leap-crm/design-system";

Playground

Change a prop and the component follows. Its code is under Props.

Tasks

3 open

Props

title
subtitle
level
icon
tone
action

Best practices

When to use it, and the rules that apply in particular places.

GuidancePractice
DoUse it to head a section inside a page or panel, like Relationships on a contact, with its Add button in action.
DoSet level so the title fits the page's outline: 3 under a panel's title, 2 when the section sits straight under the page heading.
DoPick the icon tile's tone for what the section is about, and keep the same tone for that section everywhere it appears.
Don'tUse it at the top of a drawer or dialog. Use DrawerHeader, or DialogHeader with DialogTitle, which name the popup for screen readers and wire its close button.
Don'tUse it for a quiet label over a small group. Use Eyebrow, so the section headings stay the strongest text in the panel.

Props

PropTypeDefaultDescription
iconReactNode—The 16 px icon in the 32 px tile on the left.
toneExclude<Tone, "default" | "plum"> | "neutral""info"The icon tile's colour, as IconTile.
title *ReactNode—The section's name.
subtitleReactNode—One muted line straight under the title.
actionReactNode—Controls on the right, like an Add button.
level2 | 3 | 43The heading level the title takes in the page's outline.
classNamestring—Classes added to the root element, merged with its own. Tokens only.

Code

What the playground shows, ready to copy.

import { PlusIcon, SectionHeader } from "@leap-crm/design-system";

<SectionHeader title="Tasks" subtitle="3 open" icon={<PlusIcon />} />