Under pressure

When I switched to iOS, it took me a while to get used to the new Force and 3D touch features. If you don’t use enough pressure, you enter “move icons around mode” instead of activating quick actions like peek and pop. But when it works, it’s super neat.

Of course, Force only works in native apps, right? WRONG! pressure.js brings pressure sensitivity to the web. #Blessup 🙏

Written by Stuart Yamartino, pressure.js is a JavaScript library that tracks how hard you’re pressing on an element and if you’re deep pressing on it (force click).

What can you do with it? This:

If you’ve got an iPhone 6s, 2015 Macbook Pro, or Magic Trackpad 2, try out the live demo. And if you’ve got a spoon nearby, you must see weight scale demo.

The only major differences between the web and the native implementations are the calibration and lack of haptic feedback. And unfortunately, you can’t fake the feedback on iOS with HTML5’s vibration API.

Still, this changes everything as more and more people upgrade to force-capable devices. Now go build something with it!

Comments :)
2017 Neal Shyam