Skip to content
项目

lochie/web-haptics has 2,856 GitHub stars and 96 forks. GitHot measured +1 stars in 24 hours, +4 in 7 days, and +19 in 15 days. Last checked 2026-11-25 09:35 UTC. Last push 2026-09-02.

这些数字如何统计

实测星标增长

24小时
+1
7天
+4
15天
+19
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

关于

移动 Web 的触觉反馈

网站与应用

README.md

原文

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.

探索相关项目

加载中…