Popover
A headless component for creating popovers and tooltips using modern CSS anchor positioning.
The component works in all browsers, but automatic anchor positioning requires CSS Anchor Positioning support. In older browsers without it, you’ll need to position the popover manually or use Floating UI↗︎.
Usage
The Popover component leverages the CSS Anchor Positioning API to create popovers, tooltips, and dropdown menus without JavaScript-based positioning. It provides v-model support for open/closed state management.
This is a popover using CSS anchor positioning.
Anatomy
<script setup lang="ts">
import { Popover } from '@vuetify/v0'
</script>
<template>
<Popover.Root>
<Popover.Activator />
<Popover.Content />
</Popover.Root>
</template>Recipes
Positioning
Use position-area on Popover.Content to control where the popover appears relative to its anchor. Accepts any CSS position-area↗︎ value (default: 'bottom'):
<template>
<Popover.Content position-area="top">
<!-- Appears above the anchor -->
</Popover.Content>
<Popover.Content position-area="end">
<!-- Appears to the right of the anchor -->
</Popover.Content>
</template>Use position-try to specify fallback positions when the preferred position doesn’t fit in the viewport (default: 'most-width bottom'):
<template>
<!-- Try bottom first; fall back to most available width -->
<Popover.Content position-area="bottom" position-try="most-width bottom">
Tooltip content
</Popover.Content>
</template>Accessibility
Popover uses the native Popover API — the popover attribute on the content plus popovertarget on the trigger — so opening, closing, light-dismiss (clicking outside), and Escape-to-close are all handled by the browser. Placement uses CSS Anchor Positioning.
ARIA Attributes
| Attribute | Value | Element |
|---|---|---|
popovertarget | Content popover ID | Activator |
aria-expanded | true / false | Activator |
aria-controls | Content popover ID | Activator |
popover | auto | Content |
Popover.Activator renders a <button> by default and toggles the popover through the native popovertarget attribute. Popover.Content is unstyled and carries no semantic role of its own — assign one that matches what the popover contains (for example menu, listbox, or tooltip).
Keyboard Navigation
| Key | Action |
|---|---|
Enter / Space | Toggles the popover (native button activating popovertarget) |
Escape | Closes the popover (native popover="auto" light-dismiss) |
FAQ
Set position-area on Popover.Content to any CSS position-area↗︎ value such as top or end. It defaults to bottom.
The component still renders and toggles open and closed, but automatic anchor positioning won’t apply. In older browsers (before Chrome/Edge 125, Firefox 147, or Safari 26), position Popover.Content manually or use Floating UI↗︎.
Pass position-try on Popover.Content with fallback positions (default 'most-width bottom'); the browser picks the first that fits the viewport.