Socket
Socket
Sign inDemoInstall

@vueuse/gesture

Package Overview
Dependencies
40
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vueuse/gesture

🕹 Vue Composables making your app interactive


Version published
Weekly downloads
5.5K
increased by3.75%
Maintainers
4
Install size
818 kB
Created
Weekly downloads
 

Readme

Source

🕹 @vueuse/gesture

npm npm Netlify Status

Vue Composables making your app interactive

  • 🚀 Plug & play
  • 🕹 Mouse & Touch support
  • 🎮 Directives support (v-drag, v-pinch, v-move...)
  • ✨ Written in TypeScript
  • ✅ Supports Vue 2 & 3 using vue-demi
  • 🤹 Plays well with vueuse/motion or any other animation solution

🌍 Documentation

👀 Demos

Quick Start

Let's get started quickly by installing the package and adding the plugin.

From your terminal:

pnpm add @vueuse/gesture

In your Vue app entry file:

import { createApp } from 'vue'
import { GesturePlugin } from '@vueuse/gesture'
import App from './App.vue'

const app = createApp(App)

app.use(GesturePlugin)

app.mount('#app')

You can now interact with any of your component, HTML or SVG elements using v-drag or any other directive.

<template>
  <div v-drag="dragHandler" />
</template>

<script lang="ts">
const dragHandler = (dragState) => {
  // Do something with dragState
}
</script>

To see more about the gestures events data, check out Gesture State.

To see more about the gestures options, check out Gesture Options.

Also, here is a list of the available gestures:

Credits

This package is a fork react-use-gesture by pmndrs.

If you like this package, consider following me on GitHub and on Twitter.

👋

Keywords

FAQs

Last updated on 22 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc