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" |