Pressure.js favicon

Pressure.js
A JavaScript library for handling Force Touch, 3D Touch, and Pointer Pressure on the web with a simple API.

What is Pressure.js?

Pressure.js is a JavaScript library designed to handle Force Touch, 3D Touch, and Pointer Pressure on the web, offering a simple API that works across all devices. It bundles support for different pressure-sensitive technologies into one library, ensuring developers can implement pressure interactions without dealing with device-specific complexities.

The library includes features like multitouch support, a polyfill for non-pressure-sensitive devices using time as a replacement for force, and device support testing. It supports various devices and browsers, including Microsoft Surface, Wacom Tablets, iPhones, MacBooks, and iPad Pro with Apple Pencil, making it versatile for web applications.

Features

  • Unified API: Works across Force Touch, 3D Touch, and Pointer Pressure with a simple interface
  • Device Support: Compatible with various devices including Microsoft Surface, iPhones, MacBooks, and Wacom Tablets
  • Multitouch Support: Handles multiple fingers on the screen with different force levels simultaneously
  • Polyfill Option: Uses time as a replacement for force on non-pressure-sensitive devices
  • Support Testing: Determines if a user's device supports pressure-sensitive inputs

Use Cases

  • Implementing pressure-sensitive interactions in web applications
  • Creating accessibility features like adjustable text size based on pressure
  • Developing interactive elements such as unblurring photos with pressure
  • Building games or tools that use variable pressure for controls
  • Adding force press actions like launching popovers on deep presses

FAQs

  • What devices does Pressure.js support?
    Pressure.js supports devices like Microsoft Surface, Wacom Tablets, iPhones (6s and later), MacBooks (2015 and later), Magic Trackpad 2, and iPad Pro with Apple Pencil, across browsers such as Safari, Chrome, Opera, IE, and Edge.
  • How does the polyfill work in Pressure.js?
    The polyfill in Pressure.js uses time as a replacement for force on devices that do not support Force Touch or 3D Touch, allowing similar interactions by holding down elements for a duration.
  • Can Pressure.js handle multiple touches at once?
    Yes, Pressure.js supports multitouch, allowing multiple fingers on the screen to apply different amounts of force on different elements simultaneously.
  • Is Pressure.js free to use?
    Yes, Pressure.js is a free JavaScript library available for use in web development projects.
  • How can I test if a device supports pressure with Pressure.js?
    Pressure.js includes support testing features that allow developers to determine if a user's device supports pressure-sensitive inputs, helping to tailor interactions accordingly.

Helpful for people in the following professions

Blogs:

  • Long Videos into Viral Shorts

    Long Videos into Viral Shorts

    Klap.app is an AI-powered video editing tool that transforms long-form videos into engaging short clips optimized for platforms like TikTok, Instagram Reels, and YouTube Shorts

  • Top 6 AI note-taking tools for 2026: in-person, online, and hybrid use cases

    Top 6 AI note-taking tools for 2026: in-person, online, and hybrid use cases

    Most AI note-taking lists are really lists of meeting bots, which join your video call and transcribe it. That's useful, but it's half the picture. Decisions happen in hallway conversations, client dinners, on-site visits, and hybrid rooms where nobody is on a video link. This guide covers different parts of the note-taking workflow: hardware capture for in-person settings, platform-native tools for online calls, and AI layers for organizing and synthesizing what you've captured. It compares six tools by capture context, workflow fit, pricing, and limitations.

  • Best AI Tools For Startups

    Best AI Tools For Startups

    we've compiled a straightforward list of user-friendly AI tools designed to give startups a boost. Discover practical solutions to streamline everyday tasks, enhance productivity, and gain valuable insights without the need for a tech expert. Learn where and how these tools can be applied in your startup journey, from automating repetitive tasks to unlocking powerful data analysis. Join us as we explore the features that make these AI tools accessible and beneficial for startups in various industries. Elevate your business with technology that works for you!

  • AI tools for video voice overs

    AI tools for video voice overs

    Discover the next level of video production with AI-powered voiceover tools. Enhance your content effortlessly, ensuring professional-quality narration for your videos.

Didn't find tool you were looking for?

Be as detailed as possible for better results