explaingit

ftlabs/fastclick

18,538HTMLAudience · developerComplexity · 2/5DormantLicenseSetup · easy

TLDR

A JavaScript library that removes the 300ms tap delay on older mobile browsers by firing click events immediately after a touch ends.

Mindmap

mindmap
  root((repo))
    What it does
      Removes tap delay
      Fires synthetic clicks
      Touch to click bridge
    How it works
      Listens for touchend
      Bypasses browser delay
      Desktop unaffected
    Configuration
      Attach to elements
      Attach to body
      Needsclick exemption
    Use cases
      Legacy mobile support
      Older browser compat
      Touch responsiveness
    Tech stack
      JavaScript
      Touch events
      AMD modules

Things people build with this

USE CASE 1

Support older mobile browsers that still have the 300ms tap delay by making touch interactions feel instant.

USE CASE 2

Improve perceived responsiveness of web apps on legacy Android and iOS devices.

USE CASE 3

Exempt specific UI elements from synthetic click behavior by adding the needsclick CSS class.

Tech stack

JavaScriptTouch Events API

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

FastClick is a small JavaScript library that eliminates the 300-millisecond delay between a user tapping a touchscreen and a click event firing on mobile browsers. The delay exists because mobile browsers historically waited to see whether a tap was the first of a double-tap before registering it as a single click. The readme explicitly warns that as of late 2015, most modern mobile browsers, notably Chrome and Safari, no longer have this delay, so FastClick provides no benefit on newer browsers and may actually introduce bugs. It is primarily relevant for supporting older mobile browser versions. FastClick works by listening for touchend events and immediately firing a synthetic click event, bypassing the browser's built-in delay. It does not attach any listeners on desktop browsers. It can be used on specific elements or attached to the entire document body. If certain elements need the native (non-synthetic) click behavior, you can exempt them by adding a needsclick CSS class. It is developed by FT Labs, part of the Financial Times. The library is available through npm and other package managers, and an AMD version is provided for asynchronous module loading. All code released by FT Labs is under the MIT license.

Copy-paste prompts

Prompt 1
How do I integrate FastClick into my web app to remove the tap delay on older mobile browsers?
Prompt 2
Show me how to use FastClick with only specific elements instead of the entire page.
Prompt 3
How do I prevent FastClick from affecting certain buttons or links that need native click behavior?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.