Installation
WebHaptics is available as an npm package with support for all major package managers.Package Manager
Install the library using your preferred package manager:Framework Setup
WebHaptics provides separate entry points for different frameworks. Import from the appropriate path:React
Requires React 18 or higher
Vue
Requires Vue 3 or higher
Svelte
Requires Svelte 4 or higher
Vanilla JavaScript
TypeScript Configuration
WebHaptics includes built-in TypeScript definitions. No additional@types packages are needed.
If you’re using TypeScript, ensure your tsconfig.json includes:
Verifying Installation
Test your installation with a simple haptic trigger:Next Steps
Quick Start
Create your first haptic interaction
API Reference
Explore available methods and options