- Docs
- Components
- Overlays
Popover
Content on demand, anchored to its trigger: filters, a quick edit, a detail. Not modal.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<div role="dialog">Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Playground
Every prop, live, and the code it takes.
Side
Align
import { Button, Popover, PopoverContent, PopoverTrigger } from "@qeetrix/react";
<Popover>
<PopoverTrigger render={<Button variant="soft">Filter</Button>} />
<PopoverContent title="Filter members">
…
</PopoverContent>
</Popover>02
Filters
Content on demand, anchored to its trigger. Focus moves in; Escape and an outside click close it, and focus comes back.
<Popover>
<PopoverTrigger render={<Button variant="soft" icon={ListFilterIcon}>Filter</Button>} />
<PopoverContent title="Filter members" description="Shown: 1,284 of 1,284.">
<CheckboxGroup label="Status" defaultValue={["active"]}>…</CheckboxGroup>
<PopoverClose render={<Button>Apply</Button>} />
</PopoverContent>
</Popover>03
Sides
side and align: bottom and centre by default; it flips when there's no room.
<PopoverContent side="top" title="On top">…</PopoverContent>04
Inline edit
No visible title: aria-label names it. Save closes it and shows the new name.
Payroll
<Popover>
<PopoverTrigger render={<IconButton icon={PencilIcon} aria-label="Rename the application" tone="neutral" />} />
<PopoverContent aria-label="Rename the application">
<TextField label="Application name" value={draft} onValueChange={setDraft} />
<PopoverClose render={<Button onClick={save}>Save</Button>} />
</PopoverContent>
</Popover>