explaingit

m1ckc3s/project-fathom

Analysis updated 2026-05-18

51CSSAudience · developerComplexity · 3/5Setup · easy

TLDR

A proof-of-concept web page that makes a button trigger a real iPhone haptic tap, by hiding a native switch control underneath it.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

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

Study how to trigger native iOS haptic feedback from a plain web page without building a native app.

USE CASE 2

Copy the CSS technique for overlaying an invisible native switch on a styled button while clipping its tap area correctly.

USE CASE 3

Test whether a haptic trick still works after an iOS update by running the demo on a physical iPhone.

What is it built with?

ViteReactTypeScriptCSS

How does it compare?

m1ckc3s/project-fathomtommy0103/prismfffonion/openwrt-win98-theme
Stars515356
LanguageCSSCSSCSS
Setup difficultyeasyeasymoderate
Complexity3/52/53/5
Audiencedeveloperdeveloperops devops

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

How do you get it running?

Difficulty · easy Time to first run · 5min

Only works in iOS Safari or Chrome on WebKit, Android devices need the standard Vibration API instead.

The README does not state a license.

In plain English

Project Fathom is a small proof-of-concept that demonstrates how to trigger a native haptic vibration on an iPhone from a regular web page, with no native app involved. It was built to answer a specific question: can a button on a website produce the same kind of physical tap feedback that native iOS apps use? The approach relies on a WebKit-only HTML element: a native switch control added with an input element set to type checkbox and the switch attribute. When a real finger tap toggles this control, the iOS system plays a haptic tick. The trick is to place the switch invisibly over a normal-looking styled button, so the user sees a pill button but their finger is actually tapping the native control. iOS plays the haptic, and the visible button appears to respond. As of iOS 26.5, the haptic can only fire from a direct physical tap, not from JavaScript code. That constraint turns out to be fine for a button, which is always tapped directly. The readme includes detailed CSS notes on sizing and clipping the invisible switch correctly. A button that is rounded or pill-shaped needs an overflow clip on the container, otherwise the rectangular hit area of the hidden switch extends into the blank corners outside the visible shape and fires haptics when the user taps near the button rather than on it. Two CSS approaches are shown: a quick scale-based method used in this repo and a cleaner width-and-height fill approach recommended for real use. The project runs with Vite, React, and TypeScript. It is described as a throwaway test for the technique, verified on a physical iPhone running iOS 26.5, and works in iOS Safari and Chrome. Android devices can use the standard browser Vibration API instead.

Copy-paste prompts

Prompt 1
Explain how project-fathom hides a native switch control under a button to trigger an iOS haptic tap.
Prompt 2
Walk me through running this Vite and React demo locally to test the haptic button on my iPhone.
Prompt 3
What CSS clipping approach should I use so the hidden switch's tap area matches a rounded button exactly?
Prompt 4
Why does this technique only work with a direct physical tap and not from JavaScript on iOS 26.5?

Frequently asked questions

What is project-fathom?

A proof-of-concept web page that makes a button trigger a real iPhone haptic tap, by hiding a native switch control underneath it.

What language is project-fathom written in?

Mainly CSS. The stack also includes Vite, React, TypeScript.

What license does project-fathom use?

The README does not state a license.

How hard is project-fathom to set up?

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

Who is project-fathom for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.