Skip to content

Popup

Popup is a generic floating panel positioned relative to a trigger element. Unlike DropdownMenu, it makes no assumptions about the content — the panel body is a free-form slot.

Basic

Tailwind v4
vue
<Popup>
  <template #trigger="{ open }">
    <Button :variant="open ? 'primary' : 'secondary'">Open Popup</Button>
  </template>
  <template #content>
    <p>This is free-form popup content.</p>
  </template>
</Popup>

Placement variants

Tailwind v4
vue
<Popup placement="bottom-start">...</Popup>
<Popup placement="bottom">...</Popup>
<Popup placement="bottom-end">...</Popup>
<Popup placement="top-start">...</Popup>
<Popup placement="top">...</Popup>
<Popup placement="top-end">...</Popup>

Padding sizes

Tailwind v4
vue
<Popup padding="none">...</Popup>
<Popup padding="sm">...</Popup>
<Popup padding="md">...</Popup>

Props

PropTypeDefaultDescription
placement'bottom-start' | 'bottom-end' | 'top-start' | 'top-end' | 'bottom' | 'top''bottom-start'Position of the floating panel relative to the trigger
disabledbooleanfalsePrevents the popup from opening
padding'none' | 'sm' | 'md''md'Padding inside the floating panel

Slots

SlotDescription
triggerThe element that toggles the popup. Receives { open: boolean }
contentFree-form body of the floating panel

Private — Jetpack Labs internal use only