flat dial is a flat UI component that gives you a spin event for whatever element you cast it on. It works for touch and regular mouse drag. You just cast this function on an element, and then element.addEventListener('spin', spinFunc);

Your function will get an event object with some parameters, like vector, delta, and degreeChange. You can use those as ingredients in ur css to make the dial spin, as in the example below. An use it to create spin/swirl interactions.

Flat Dial uses the spin module from a proto library of UI components called uxer which uses the event module touchdown at its core.

To use, install and require it.

npm install uxer-flat-dial

var dial =require('uxer-flat-dial');

var myDialElement = dial();// returns an HTMLElement

See the example below, which can be easily run if you have browserify and opa installed: