Overlay
Popover
A non-modal dialog anchored to what opened it, closing on Escape, a press outside or tabbing out.
WAI-ARIA tested
Import
main.ts
import { Popover } from '@vitral/vue';Placement
`placement` picks the side; it flips when there is no room.
API
Read from packages/vue/src/components/Popover/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| placement | OverlayPlacement | Where it opens relative to its target; it flips when there is no room. Defaults to `'bottom-start'`. |
| dismissable | boolean | Close on a press outside. Defaults to true. |
| closeOnEscape | boolean | Defaults to true. |
| offset | number | Gap to the target, in pixels. Defaults to 8. |
| appendTo | string | `'body'` (the default), `'self'` to render in place, or a selector. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| show | — | — |
| hide | — | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| default | (props: { closeCallback: () => void }) | — |