Haptic feedback for the mobile web. Supports React, Vue, and Svelte.
npm i web-hapticsimport { 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:allpnpm devpnpm buildFollow 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.