talira

interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping

open sourceMITfree

interact.js is a JavaScript library for drag and drop, resizing and multi-touch gestures in the browser, with inertia and snapping. It handles several simultaneous interactions, works with SVG elements, runs on desktop and mobile browsers (and Internet Explorer 9 and later), is standalone and customizable, and doesn't modify the DOM except to change the cursor. It's written in TypeScript with type definitions included, installs with npm install interactjs or from a CDN, and is MIT licensed.

Problems it solves

  • I want draggable, resizable boxes in my web app that also work on touch screens
  • I need snapping to a grid when users drag elements
  • I want gesture interactions on SVG elements in the browser

Features

  • Drag and drop, resizing and gestures
  • Inertia and snapping
  • Multi-touch and simultaneous interactions
  • SVG element support
  • Desktop and mobile browsers
  • Doesn't modify the DOM beyond the cursor
  • TypeScript definitions