Web Haptic Feedback

git clone …/Web-Haptic-Feedback
Haptics
SuccessConfirmation
NudgeSoft prompt
ErrorFailure
BuzzLong alert

Install

git clone https://github.com/zakisheriff/Web-Haptic-Feedback.git
cd Web-Haptic-Feedback
pnpm install && pnpm build

Local workspace packages. Not yet published to npm.

Usage

import { HapticButton } from "@universal-web-haptics/react";

<HapticButton feedback="success">Tap me</HapticButton>

Custom haptic

haptics.trigger([12,35,22])

What is Web Haptic Feedback?

Web Haptic Feedback is an open-source JavaScript and React library for haptic feedback on websites. It uses the Vibration API on Android and a native switch control on iPhone Safari 17.4+, so a tap produces system feedback.

Frequently asked questions

Does web haptic feedback work on iPhone?
Does it work on Android?
How do I add it to a React app?
Is it free?
Can a website prove the user felt the haptic?