All Projects → mesqueeb → quasar-app-extension-swipe-to-close

mesqueeb / quasar-app-extension-swipe-to-close

Licence: MIT license
A Quasar extension that allows you to close dialogs by swiping.

Programming Languages

Vue
7211 projects
javascript
184084 projects - #8 most used programming language

Quasar extension: Swipe to close

ARCHIVED: When I need similar functionality again in the future I will recreate a new project that is framework agnostic.

A Quasar extension that allows you to close dialogs by swiping.

My extensions

Installation

quasar ext add swipe-to-close

Demo

GIF (might take a while to load...)

gif

Usage

You just have to wrap your q-dialog contents inside a q-swipe-to-close component with the same v-model as the q-dialog.

<template>
  <q-btn @click="showDialog = true">Show dialog</q-btn>
  <!-- add position bottom -->
  <q-dialog v-model="dialogBool" position="bottom">
    <!-- add same v-model -->
    <q-swipe-to-close v-model="dialogBool">
      <div class="dialog-contents">I'm a swipable dialog!</div>
    </q-swipe-to-close>
  </q-dialog>
</template>

<script>
export default {
  data () {
    return { showDialog: false }
  }
}
</script>

Please note currently it only supports position="bottom" or no position.

If there's interest for other dialog positions and swipe directions, let me know in an issue!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].