@bigmistqke/minni
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

🐭 minni, a minimal drag utility

import {minni} from "@bigmistqke/minni"

const mouseDownHandler = async (e: MouseEvent) => {
  console.log('start dragging')

  const delta = await minni(e, (delta, e) => {
    console.log('dragging:', delta)
    console.log('mouse-event:', e)
  })

  console.log('total drag:', delta)
}

const touchStartHandler = async (e: TouchEvent) => {
  console.log('start dragging')

  const delta = await minni(e, (delta, e) => {
    console.log('dragging:', delta)
    console.log('touch-event:', e)
  })

  console.log('total drag:', delta)
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.70latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @bigmistqke/minni

Weekly Downloads

0

Version

0.0.7

License

MIT

Unpacked Size

7.56 kB

Total Files

8

Last publish

Collaborators

  • bigmistqke