Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

WebHaptics

Haptic feedback for the mobile web. Supports React, Vue, and Svelte.

Installation

npm i web-haptics

Usage

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.

Contributing

Install dependencies

pnpm install:all

Dev/Watch Library and Example

pnpm dev

Build Library

pnpm build

Found this useful?

Follow me on Twitter.

Other projects

You might also like:

  • Torph - Dependency-free animated text component.
  • easing.dev - Easily create custom easing graphs.

Acknowledgements

  • Special thanks to Alex for assistance with the site design.

About

Haptic feedback for the mobile web

Resources

Stars

2.8k stars

Watchers

10 watching

Forks

Used by

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /