Popover
Popover API panel
Extra content next to the thing that opens it — a small form, details, a colour picker. For a one-line hint use a Tooltip; for commands, a DropdownMenu.
Native popover=auto: light dismiss, Esc, top layer.
Native popover=auto: light dismiss, Esc, top layer.
Native popover=auto: light dismiss, Esc, top layer.
Native popover=auto: light dismiss, Esc, top layer.
Native popover=auto: light dismiss, Esc, top layer.
Native popover=auto: light dismiss, Esc, top layer.
Native popover=auto: light dismiss, Esc, top layer.
Native popover=auto: light dismiss, Esc, top layer.
Not inside <p>
The floating panel is a <div>. HTML closes a <p> when it meets a <div>, so a trigger placed inside a paragraph renders differently on the server and the client. Wrap with <span>/<div> instead.
- A click on the trigger opens it; the trigger is told what it opens and whether it's open. Esc or a click outside closes it, and focus goes back to the trigger if it was inside.
modalturns off the click-outside close (Esc and your own control still close it).trigger="hover"opens on hover and focus, for previews only — see HoverCard.titlenames it;arrowpoints its accent edge at the trigger.
Usage
import { BlessPopover } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
placement | Placement | "bottom" | |
offset | number | — | |
trigger | "click" | "hover" | "manual" | "click" | trigger interaction |
openDelay | number | 300 | |
closeDelay | number | 200 | |
modal | boolean | — | no light dismiss: only Esc or your own control closes it |
title | string | — | |
arrow | boolean | — | the accent edge slides along to point at the trigger |
open | boolean | false |
Events
| Name | Payload | Description |
|---|---|---|
update:open | [value: boolean] |
Slots
| Name | Scope | Description |
|---|---|---|
trigger | { open: boolean; } | |
default | { close: () => boolean; } |