npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-draggable-popup

v0.0.1

Published

> A lightweight, TypeScript-friendly Vue 3 library that provides a draggable, resizable popup component designed to work alongside Quasar UI (optional). Exports a plugin and named component for easy integration.

Downloads

93

Readme

Vue Draggable Popup

A lightweight, TypeScript-friendly Vue 3 library that provides a draggable, resizable popup component designed to work alongside Quasar UI (optional). Exports a plugin and named component for easy integration.

Package: vue-draggable-popup

Highlights

  • TypeScript friendly: component uses <script setup lang="ts"> and ships with a TS shim.
  • Draggable & Resizable: native mouse/touch handlers for drag and resize.
  • z-index management: simple utilities to keep popups on top.
  • Small reactive store: supports single-open-popup behavior (toggle allowMultiple).

Peer dependencies

  • vue ^3.x
  • quasar ^2.x (only used by the component's default header markup; header slot can be used instead to avoid Quasar dependency)

Quick Install (consumer)

Install from npm:

npm install vue-draggable-popup
# Ensure your project provides Vue and (optionally) Quasar
npm install vue
npm install quasar

Usage (global plugin)

// main.ts (consumer app)
import { createApp } from 'vue'
import App from './App.vue'
import VueDraggablePopup from 'vue-draggable-popup'

const app = createApp(App)
app.use(VueDraggablePopup)
app.mount('#app')

Then in any component template:

<template>
  <DraggablePopup v-model="show" :useHeader="true" label="Hello">
    <div>Popup body content</div>
  </DraggablePopup>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const show = ref(true)
</script>

Usage (named import)

import { DraggablePopup } from 'vue-draggable-popup'

Register locally in a component if preferred.

Component API

  • Props

    • modelValue (boolean) — required. Controls visibility (v-model).
    • useHeader (boolean) — default false. Show header area.
    • useCustomHeader (boolean) — default false. Use the custom_header slot.
    • color (string) — header background color (used when not useCustomHeader).
    • label (string) — header center label.
    • hideCloseBtn (boolean) — default false.
    • dragHandleSelector (string | null) — CSS selector to find custom drag handle inside popup.
    • resetZIndexOnClose (boolean) — default true.
    • minWidth, minHeight, maxWidth, maxHeight, width, height (numbers) — sizing.
    • resizable (boolean) — default true.
    • popupId (string | null) — identifier used by store when allowMultiple is false.
    • allowMultiple (boolean) — default false. When false, opening another popup closes the previous one.
  • Emits

    • update:modelValue (boolean) — v-model update when popup closed/opened.
    • update:width (number) — emitted during resize.
    • update:height (number) — emitted during resize.
  • Slots

    • default — popup content body.
    • header — left header slot (used with default header markup).
    • header_right_slot — right side header slot.
    • custom_header — full custom header markup when useCustomHeader is true.

Notes about Quasar

  • The component's default header includes Quasar components (q-bar, q-btn, q-tooltip). If you prefer no Quasar dependency, either:
    • Provide useCustomHeader plus the custom_header slot and use plain HTML/CSS for the header, or
    • Replace the default header markup in src/components/DraggablePopup.vue with your preferred UI elements.

This project builds in Vite library mode and externalizes vue and quasar as peers.