Skip to content

Popup

Demo

Popup Cross-platform Example and Preview

PopupShipping Method

Basic Usage

vue
<script setup lang="ts">
import { ref } from 'vue'

const visible = ref(false)
</script>

<template>
  <VButton @click="visible = true">Open popup</VButton>
  <VPopup v-model:visible="visible" position="bottom" round closeable>
    <div class="popup-body">Popup content</div>
  </VPopup>
</template>

Positions

vue
<template>
  <VPopup v-model:visible="visible" position="top" />
  <VPopup v-model:visible="visible" position="bottom" />
  <VPopup v-model:visible="visible" position="left" />
  <VPopup v-model:visible="visible" position="right" />
  <VPopup v-model:visible="visible" position="center" />
</template>

Close Button

vue
<template>
  <VPopup v-model:visible="visible" closeable close-icon-position="top-right" />
</template>

Props

PropTypeDefaultDescription
visibleboolean | undefinedundefinedControlled visibility
defaultVisiblebooleanfalseInitial uncontrolled visibility
disabledboolean | undefinedundefinedDisable internal visibility changes
position'center' | 'top' | 'bottom' | 'left' | 'right''bottom'Popup placement
overlaybooleantrueRender overlay
closeablebooleanfalseRender close button
closeIconstring'×'Close button content
closeIconPosition'top-left' | 'top-right' | 'bottom-left' | 'bottom-right''top-right'Close button position marker
roundbooleanfalseRounded content marker
safeAreaInsetBottombooleanfalseBottom safe-area marker
lockScrollbooleanfalseLock body scroll while visible
closeOnClickOverlaybooleantrueClose on overlay click
zIndexnumber | stringundefinedPopup z-index
durationnumber | stringundefinedAnimation duration; numbers are seconds
destroyOnClosebooleantrueDestroy content when closed

Events

EventPayloadDescription
update:visiblebooleanControlled sync event
visibleChangebooleanVisibility changed
closevoidClose requested
clickOverlayvoidOverlay clicked

Slots

SlotDescription
defaultPopup content
closeIconCustom close button content

Primitives

PopupRoot uses usePopupRoot for visibility, overlay click, and Escape close behavior; UI packages keep the Varo-style component entry.