Popover
ボタンによってトリガーされるポータルにリッチコンテンツを表示します。
いつ使用するか
- 追加の機能や操作を提供するためのシンプルなポップアップメニュー。
- Tooltipと比較して、情報に加えて、Popoverカードはリンクやボタンなどのアクション要素も提供できます。
使用法
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 リファレンス
| プロパティ | 説明 | タイプ | デフォルト |
|---|---|---|---|
| position | The preferred placement of the popover. | "top" | "bottom" | "left" | "right" | "bottom" |
| trigger | The event that triggers the popover. | "click" | "hover" | "click" |