Coder Social home page Coder Social logo

uvacoder / gesture Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vueuse/gesture

0.0 0.0 0.0 1.57 MB

๐Ÿ•น Vue Composables making your app interactive

Home Page: https://gesture.vueuse.org

License: MIT License

JavaScript 5.16% TypeScript 94.84%

gesture's Introduction

๐Ÿ•น @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:

yarn 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.

๐Ÿ‘‹

gesture's People

Contributors

ch99q avatar tahul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.