About this project
This library enables coordinated tactile, auditory, and visual feedback for web interactions using a single, tunable API. It supports Android vibration via navigator.vibrate and iOS Taptic Engine via input switch hacks. Each feedback channel — haptics, sound, and motion — can be independently enabled, disabled, or tuned at runtime. Sound is synthesized via Web Audio with 20 built-in cues or customizable sample packs. Motion uses emoji particles and springy boops, respecting prefers-reduced-motion. The API mimics iOS UIFeedbackGenerator semantics (selection, impact, notification, etc.) and allows custom tuning of strength, volume, scale, and event mappings. Designed for future native backend swaps (e.g., Capacitor), it’s framework-agnostic, SSR-safe, and ships with TypeScript types and zero runtime dependencies. Diagnostics help debug platform-specific issues like missing vibration permissions. Ideal for enhancing UI feedback without relying on platform-specific APIs directly.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.