Popover
Displays rich content in a portal, triggered by a button.
When To Use
- A simple popup menu to provide extra information or operations.
- Comparing with Tooltip, besides information Popover card can also provide action elements like links and buttons.
Usage
astro
<Popover position="top">
<Button variant="outline">Open Popover</Button>
<div slot="content" class="w-80">
<div class="grid gap-4">
<div class="space-y-2">
<h4 class="font-medium leading-none">Dimensions</h4>
<p class="text-sm text-zinc-500">Set the dimensions for the layer.</p>
</div>
</div>
</div>
</Popover> API Reference
| Property | Description | Type | Default |
|---|---|---|---|
| position | The preferred placement of the popover. | "top" | "bottom" | "left" | "right" | "bottom" |
| trigger | The event that triggers the popover. | "click" | "hover" | "click" |