- Accordion new
- ActionSheet new
- Alert new
- Alert Dialog new
- Angle Slider new
- Autocomplete new
- Avatar new
- Badge new
- Breadcrumb new
- Button new
- Button Group new
- Card new
- Carousel new
- Checkbox new
- Clipboard new
- Collapsible new
- Color Picker new
- Date Input new
- Date Picker new
- Dialog new
- DialogCaller new
- Drawer beta
- Editable new
- Empty new
- Field new
- Fieldset new
- File Upload new
- Filters new
- Floating Panel new
- Hover Card new
- Image new
- Image Cropper new
- Input new
- Input Group new
- Json Tree View new
- Kbd new
- Listbox new
- Marquee new
- Menu new
- Number Input new
- Pagination new
- Password Input new
- PhoneField new
- Pin Input new
- Popover new
- Progress Circular new
- Progress Linear new
- Qr Code new
- Radio Group new
- Rating Group new
- Scroll Area new
- ScrollSpy new
- Segment Group new
- Select new
- Separator new
- Sidebar new
- Signature Pad new
- Skeleton new
- Slider new
- Splitter new
- Steps new
- Switch new
- Table new
- Tabs new
- Tags Input new
- Textarea new
- Timeline new
- Timer new
- Toast new
- Toc new
- Toggle new
- Toggle Group new
- Tooltip new
- Tour new
- Tree View new
- Typography new
Popover
Vue popover to show contextual content anchored to a trigger without blocking the page.
Installation
Install from the Vuzeno registry:
bunx --bun shadcn-vue@latest add https://vuzeno.com/r/popover.json
npx shadcn-vue@latest add https://vuzeno.com/r/popover.json
yarn dlx shadcn-vue@latest add https://vuzeno.com/r/popover.json
pnpm dlx shadcn-vue@latest add https://vuzeno.com/r/popover.json
Usage
<script setup lang="ts">
import { Popover } from "@/components/ui/popover";
</script>
<template>
<Popover.Root>
<!-- … -->
</Popover.Root>
</template>
Composition
Popover.Root
├── Popover.Anchor
├── Popover.ArrowTip
├── Popover.Arrow
├── Popover.CloseTrigger
├── Popover.Content
├── Popover.Context
├── Popover.Description
├── Popover.Indicator
├── Popover.RootProvider
├── Popover.Title
├── Popover.Trigger
Examples
Controlled
Use the open and onOpenChange props to control the open state of the popover.
Root Provider
An alternative way to control the popover is to use the RootProvider component and the usePopover hook. This way you can access the state and methods from outside the component.
Arrow
Use Popover.Arrow and Popover.ArrowTip to render an arrow pointing to the trigger.
Placement
To change the placement of the popover, set the positioning prop.
Close Behavior
The popover is designed to close on blur and when the esc key is pressed.
- To prevent it from closing on blur (clicking or focusing outside), pass the
closeOnInteractOutsideprop and set it tofalse. - To prevent it from closing when the esc key is pressed, pass the
closeOnEscprop and set it tofalse.
Modality
In some cases, you might want the popover to be modal. This means that it'll trap focus within its content, block scrolling on the body, disable pointer interactions outside the popover, and hide content behind the popover from screen readers.
Anchor
Use Popover.Anchor to position the popover relative to a different element than the trigger.
Same Width
Use positioning.sameWidth to make the popover match the width of its trigger element.
Dialog Integration
When rendering a popover inside a dialog, use lazyMount and unmountOnExit on the popover root so it is properly unmounted when the dialog closes.
Nested
Popovers can be nested within each other. Each nested popover maintains its own open state and positioning.
Multiple Triggers
Share a single popover across multiple trigger elements. Pass a value to each Popover.Trigger — the popover repositions to whichever trigger is activated without closing.
API
See Ark UI Popover docs for full props and examples.