1.0.1 • Published 10 months ago

use-haptic v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

use-haptic

A convenient React hook that utilizes input[switch] introduced in Safari 18.0 to trigger haptic feedback anytime, anywhere in your application.

Features

  • Trigger haptic feedback at any time in your React application
  • Simple API

Install

npm install use-haptic
yarn add use-haptic
pnpm add use-haptic
bun add use-haptic

Usage

import { useHaptic } from "use-haptic";

function VibrationButton() {
  const { vibe } = useHaptic();
  return <button onClick={vibe}>Vibe</button>;
}

License

MIT

1.0.1

10 months ago

1.0.0

10 months ago