Haptic feedback for the mobile web. Supports React, Vue, and Svelte.
npm i web-haptics
import { useWebHaptics } from "web-haptics/react"; function App() { const { trigger } = useWebHaptics(); return <button onClick={() => trigger("success")}>Tap me</button>; }
See the package README for Vue, Svelte, and vanilla examples.
pnpm install:all
pnpm dev
pnpm build
Follow me on Twitter.
You might also like:
- Torph - Dependency-free animated text component.
- easing.dev - Easily create custom easing graphs.
- Special thanks to Alex for assistance with the site design.