shadcn.io is an independent project built on shadcn/ui
Open shows a title that reads Title and the line Content goes here. Cancel and Confirm sit at the end of the panel. Both close it.
Use it for a quick confirm tied to one control. A decision that cannot be undone belongs in an Alert Dialog. In Vue, Ark UI does not perform the confirm.
Installation
Anatomy

Usage
<Popover>
<PopoverTrigger :asChild="true">
<Button variant="outline">Open</Button>
</PopoverTrigger>
<PopoverContent>
<PopoverHeader>
<PopoverTitle>Title</PopoverTitle>
<PopoverDescription>Content goes here.</PopoverDescription>
</PopoverHeader>
<div class="flex justify-end gap-2">
<PopoverClose :asChild="true">
<Button size="sm" variant="outline">Cancel</Button>
</PopoverClose>
<PopoverClose :asChild="true"><Button size="sm">Confirm</Button></PopoverClose>
</div>
</PopoverContent>
</Popover>FAQ
How are Cancel and Confirm arranged?
They sit in a div with flex justify-end gap-2. Both are size="sm": Cancel uses variant="outline" and Confirm the default variant. Either one closes the panel.
How do I close this panel from code?
Cancel and Confirm close the panel.
Here each button sits in PopoverClose, which closes the panel without any state. To close it from your own code, control the open state on Popover.
Bind v-model:open on Popover.
What is the text above the buttons?
PopoverHeader wraps PopoverTitle reading Title and PopoverDescription reading Content goes here. The button row is the next block in PopoverContent.
How does the Open button become the trigger?
The trigger is a Button with variant="outline" and the label Open. Activating it opens the panel. The footer buttons are what set open back to false.
Set asChild on PopoverTrigger and pass that one button. PopoverContent is the panel.
API Reference
Popover
Sets asChild. The rest is on the Popover page.
Button
Sets variant="outline" and size="sm". The rest is on the Button page.





