Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

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

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published