Popover
A floating panel opened from a button, and the parts popouts are built from: a section label, a separator, a search field and a person row. Built on ui-sdk's Popover: Escape and an outside press close it, focus returns to the trigger, and it opens in the top layer.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { Popover, PopoverTrigger, PopoverContent } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
Props
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Use it for a small panel tied to a control, like sharing an opportunity, where the rest of the page stays usable while it is open. |
| Do | Name it with PopoverTitle, and close it from its own actions with PopoverClose. Focus returns to the trigger when it closes. |
| Do | For a list of rows, pass className="w-56 p-0" and build it from PopoutSearch, PopoutSectionLabel, PopoutSeparator and PopoutPersonRow. |
| Do | Give PopoutSearch an aria-label, like Search people. The placeholder is not a name. |
| Do | Keep a custom row's corners smaller than the panel's, as PopoutPersonRow does, and put its selection tick on the right. |
| Don't | Use it for a list of actions on a record. Use DropdownMenu, which adds arrow keys, typeahead and the menu role. |
Props
Popover also takes ui-sdk's options (open, defaultOpen, onOpenChange, modal, openOnHover, delay, presentation, controller). PopoverContent takes its position and focus props (side, alignOffset, collisionPadding, anchor, initialFocus, finalFocus, keepMounted), and PopoverTrigger and PopoverClose take render.
Popover
No props of its own.
PopoverContent
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | What it shows inside. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
| align | unknown | "center" | How it lines up along that side: start, center or end. |
| sideOffset | unknown | 4 | The gap between it and what it opens from, in pixels. |
PopoverTitle
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
PopoverDescription
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
PopoutSectionLabel
No props of its own.
PopoutSeparator
No props of its own.
PopoutSearch
| Prop | Type | Default | Description |
|---|---|---|---|
| aria-label * | string | — | Names the field for screen readers; the placeholder is not a name. |
| placeholder | unknown | "Search…" | Grey hint text while it's empty. Never a replacement for a label. |
PopoutPersonRow
| Prop | Type | Default | Description |
|---|---|---|---|
| name * | string | — | The person's name, on the row's first line. |
| detail | string | — | The grey second line, like "Client · ada@hartley.com". |
| initials | string | — | Two letters for the avatar. From the name when left out. |
| selected | boolean | false | Shows the navy tick on the right. |
Code
What the playground shows, ready to copy.
import {
Button,
Popover,
PopoverContent,
PopoverDescription,
PopoverTitle,
PopoverTrigger,
} from "@leap-crm/design-system";
<Popover>
<PopoverTrigger render={<Button intent="outline">Share</Button>} />
<PopoverContent>
<PopoverTitle>Share this opportunity</PopoverTitle>
<PopoverDescription>
Anyone at the firm with the link can open it.
</PopoverDescription>
</PopoverContent>
</Popover>Panel
A title, a description and actions. PopoverClose closes it from inside; focus goes back to Share.
Popout
A list of rows: a search field with a rule under it, quiet section labels, dividers between groups, and two-line person rows with a navy tick on the selected one. Pass className="w-70 p-0" to drop the panel's padding.
Popout parts
Each part on its own: Section label (12/16, 450, muted), Separator (the divider colour, 4 px above and below), Search (36 px) and Person row (48 px; highlighted as data-highlighted).
What the examples share
The imports and the scaffolding the examples above call. The scaffolding lives in this page, not in the library.
import { Link2, UserPlus } from "lucide-react";
import { Button, PopoutPersonRow, PopoutSearch, PopoutSectionLabel, PopoutSeparator, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger } from "@leap-crm/design-system";
const recent = [
{ name: "Ada Hartley", detail: "Client · ada@hartley.com", selected: true },
{ name: "Ben Okafor", detail: "Other side · ben@okafor.law" },
] as const;
const everyone = [
{ name: "Chloe Nguyen", detail: "Staff · Conveyancing" },
{ name: "Dev Patel", detail: "Staff · Family law" },
] as const;
function SharePanel() {
return (
<Popover>
<PopoverTrigger
render={
<Button intent="outline" icon={<Link2 />}>
Share
</Button>
}
/>
<PopoverContent>
<div className="flex flex-col gap-3">
<div className="flex flex-col gap-1">
<PopoverTitle>Share this opportunity</PopoverTitle>
<PopoverDescription>
Anyone at the firm with the link can open it.
</PopoverDescription>
</div>
<div className="flex justify-end gap-2">
<PopoverClose
render={
<Button intent="ghost" size="sm">
Cancel
</Button>
}
/>
<PopoverClose render={<Button size="sm">Copy link</Button>} />
</div>
</div>
</PopoverContent>
</Popover>
);
}Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| EnterSpace | Open the popover from its trigger. |
| Tab | Moves through the popover in order; from the last element, moves to the element after the trigger. |
| Shift + Tab | From the first element, returns focus to the trigger. |
| Escape | Closes the popover and returns focus to the trigger. |







