App Header
The CRM's 48 px navy bar: page links on the left, round actions and the user on the right. On navy, keyboard focus is the light halo alone. Notification rows fill the bell's list.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { AppHeader, HeaderNavLink, HeaderIconButton, NotificationRow } from "@leap-crm/design-system";Header
Press a page to move the orange underline; hover for orange; Tab for the inset halo. The bell carries a red count and turns orange while its list is open (press it).
Icon buttons
32 px, the raised chrome tone at rest (navy-400 in light mode), a step lighter on hover, brand orange while open. The count hides at 0 and caps at 99+; screen readers hear it in the name.
Notification rows
Unread: dark title at 450 on white. Read: muted at 400 on the subtle fill. Hover or keyboard focus shows the muted highlight, never a ring.
What the examples share
The imports and the scaffolding the examples above call. The scaffolding lives in this page, not in the library.
import { Bell, BookUser, ChartLine, LayoutDashboard, Plus, Search, Sprout, SquareCheckBig, UserPlus } from "lucide-react";
import { useState } from "react";
import { AppHeader, Avatar, HeaderIconButton, HeaderNavLink, NotificationRow } from "@leap-crm/design-system";
const pages = [
{ label: "Dashboard", icon: <LayoutDashboard /> },
{ label: "Opportunities", icon: <Sprout /> },
{ label: "Contacts", icon: <BookUser /> },
{ label: "Insights", icon: <ChartLine /> },
];
function Header() {
const [page, setPage] = useState("Opportunities");
const [open, setOpen] = useState(false);
return (
<AppHeader
className="w-full"
nav={pages.map(item => (
<HeaderNavLink
key={item.label}
href="/app-header"
icon={item.icon}
active={page === item.label}
onClick={event => {
event.preventDefault();
setPage(item.label);
}}
>
{item.label}
</HeaderNavLink>
))}
actions={
<>
<HeaderIconButton icon={<Plus />} aria-label="New" />
<HeaderIconButton icon={<Search />} aria-label="Search" />
<HeaderIconButton
icon={<Bell />}
aria-label="Notifications"
count={3}
open={open}
onClick={() => setOpen(value => !value)}
/>
<Avatar size="lg" person="staff" name="Jane Citizen" initials="JC" />
</>
}
/>
);
}Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Use AppHeader once, at the top of the app, with a HeaderNavLink for each main page and HeaderIconButtons and the user's avatar in actions. |
| Do | Pass your router's link as each HeaderNavLink's render, and set active on the page you're on so it is marked with aria-current. |
| Do | Give every HeaderIconButton an aria-label, like "Notifications", and set open while its popover or menu is open so it shows orange. |
| Do | Pass unread items as count. It hides at 0, caps at 99+, and screen readers hear it as part of the button's name. |
| Don't | Put a library Button or IconButton on the navy bar. Use HeaderIconButton, which takes the chrome text colour and shows focus as the halo alone, as navy needs. |
| Don't | Mark a notification read by colour alone. Set read on its NotificationRow; screen readers hear "Unread" before every title that isn't. |
Props
AppHeader
| Prop | Type | Default | Description |
|---|---|---|---|
| nav * | ReactNode | — | The main navigation: HeaderNavLinks. |
| actions | ReactNode | — | The actions on the right: HeaderIconButtons and the user's avatar. |
| navLabel | string | "Main" | Names the navigation for screen readers. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
HeaderNavLink
| Prop | Type | Default | Description |
|---|---|---|---|
| icon * | ReactNode | — | A 16 px icon before the label. |
| children * | string | — | What it shows inside. |
| active | boolean | false | The page you're on: orange at 600, with the 3 px underline. |
| render | ReactElement<{ className?: string; children?: ReactNode }> | — | Your router's link, like <Link to="/contacts" />. Defaults to an <a>. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
HeaderIconButton
| Prop | Type | Default | Description |
|---|---|---|---|
| icon * | ReactNode | — | The 16 px icon it shows. Name the button with aria-label. |
| aria-label * | string | — | An icon-only button has no visible text, so its name is required. |
| count | number | 0 | Unread or waiting items, as a red count in the corner. Hidden at 0. |
| open | boolean | false | Its popover or menu is open: brand orange. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
NotificationRow
| Prop | Type | Default | Description |
|---|---|---|---|
| icon * | ReactNode | — | A 16 px icon for what happened, like a checked square for a task. |
| title * | string | — | What happened, in a line, like "Ada assigned you a task". |
| meta | string | — | The detail line, like "Call the vendor's solicitor · Due tomorrow". |
| time * | string | — | How long ago, already worded, like "2m". |
| read | boolean | false | Read notifications sit on the subtle surface with a muted, regular-weight title; unread ones are announced as Unread. |
| onSelect | () => void | — | Opens what it's about. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| Tab | Moves through the links and buttons in order. |
| Enter | Follows the focused link. |
| EnterSpace | Presses the focused button. |





