explaingit

ftlabs/fastclick

Analysis updated 2026-06-21

18,541HTMLAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

A small JavaScript library that removes the 300-millisecond tap delay on older mobile browsers by immediately firing a synthetic click, the readme warns it is mostly obsolete for modern browsers built after 2015.

Mindmap

mindmap
  root((repo))
    What it does
      Eliminate tap delay
      Fire synthetic click
      Speed up mobile UI
    How it works
      Listen for touchend
      Skip 300ms wait
      Exempt needsclick
    Use cases
      Legacy iOS browsers
      Legacy Android browsers
      Older mobile web apps
    Tech stack
      JavaScript
      HTML
      npm or AMD
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Eliminate the 300ms tap delay in a legacy mobile web app to make buttons feel instantly responsive

USE CASE 2

Add FastClick to a specific slow-responding element without affecting the rest of the page

USE CASE 3

Support older iOS or Android browser versions where the native tap delay is still present

USE CASE 4

Exclude specific elements from FastClick using the needsclick CSS class to keep their native click behavior

What is it built with?

JavaScriptHTML

How does it compare?

ftlabs/fastclickuikit/uikitprinzhorn/skrollr
Stars18,54118,53318,418
LanguageHTMLHTMLHTML
Setup difficultyeasyeasyeasy
Complexity1/52/52/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
MIT license, 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
Add FastClick to my existing mobile web app to eliminate the 300ms tap delay on older iOS browsers, show me the minimal setup code to attach it to the document body.
Prompt 2
How do I apply FastClick to only a single button element instead of the whole document so I can fix one slow tap without risking side effects elsewhere?
Prompt 3
Show me how to exempt a specific element from FastClick using the needsclick CSS class so it keeps the browser's native click timing.
Prompt 4
How do I detect at runtime whether a user's mobile browser already handles tap delay natively so I can skip loading FastClick for modern devices?
Prompt 5
What bugs or side effects should I watch out for when adding FastClick to a modern mobile web app that targets current Chrome and Safari?

Frequently asked questions

What is fastclick?

A small JavaScript library that removes the 300-millisecond tap delay on older mobile browsers by immediately firing a synthetic click, the readme warns it is mostly obsolete for modern browsers built after 2015.

What language is fastclick written in?

Mainly HTML. The stack also includes JavaScript, HTML.

What license does fastclick use?

MIT license, use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is fastclick to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is fastclick for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub ftlabs on gitmyhub

Verify against the repo before relying on details.