Popover | PopoverContent
PopoverContent#
Description#
- Component representing the popover body: a non-modal
dialogthat teleports tobodyand positions itself relative to the anchor or trigger. Includes focus management, close on Escape and outside click, and repositioning on scroll or resize.
Props#
side('top' | 'bottom' | 'left' | 'right') — Preferred side relative to the anchor. Default:'bottom'.align('start' | 'center' | 'end') — Alignment relative to the anchor. Default:'start'.sideOffset(number) — Distance in pixels between the anchor and the content. Default:4.trapFocus(boolean) — Makes Tab cycle inside the content. Default:false.padding('none' | 'sm' | 'md') — Internal padding of the content. Default:md.label(string) — Accessible name for the content, useful when there is no visible title.
Usage#
| |
Notes#
- Without
trapFocus, leaving the content with Tab closes the popover and returns focus to the trigger. - It teleports to
bodyto avoid being clipped by parentoverflow. - The content is hidden with
v-showand madeinertwhen closed.