npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bloxwap/haptic

v0.2.0

Published

Physical-tap haptic feedback for React on iOS and vibration-capable browsers.

Readme

Installation

npm install @bloxwap/haptic

React and React DOM are external peers. Use matching React 18+ versions. ESM, CommonJS, and TypeScript declarations are included.

Usage

import { Haptic } from '@bloxwap/haptic';

<Haptic feedback="success">
  <button onClick={save}>Save</button>
</Haptic>

Your target keeps its handlers, ref, focus, and accessibility attributes. HapticTarget is the same component.

Options: enabled (default true), disabled (false), feedback (selection), triggerOptions, webHapticsOptions, className, and style. The wrapper uses inline-grid by default. Disabled and aria-disabled="true" hosts suppress feedback.

Feedback accepts selection, light, medium, heavy, soft, rigid, success, warning, error, nudge, buzz, a duration in milliseconds, alternating on/off arrays, vibration event objects, or a preset object.

iOS physical taps use a native system tick; presets and intensity do not change it. Synthetic events, timers, and async callbacks cannot promise iOS feedback. Desktop audio preview is opt-in with webHapticsOptions={{ debug: true }}. Actual feedback depends on hardware, browser, and settings.

Physical-device and VoiceOver certification remains pending in issue #9. Automated tests verify browser interactions and API calls, not tactile output.

Exports also include isIOSWebKitWithoutVibration, useIOSNativeHaptics, canTriggerHaptic, triggerHaptic, HapticTargetProps, HapticCapability, HapticTriggerResult, HapticInput, HapticPattern, HapticPreset, TriggerOptions, Vibration, and WebHapticsOptions. The wrapper/platform code is independent; feedback types and the vibration engine use the declared web-haptics dependency.

canTriggerHaptic() probes current imperative availability without creating DOM. triggerHaptic(cue?, options?) requests browser vibration with the same patterns and resolves { delivered, mechanism, reason? } without rejecting or creating auxiliary DOM. delivered means browser acceptance, not observed tactile output. iOS imperative feedback reports unavailable even during transient activation: programmatic switch clicks do not establish a trusted physical tap. Use HapticTarget for the eligible iOS physical path.

Documentation

API, guides, and interactive demos. Source and release evidence.

License

MIT

HIG semantic feedback

@bloxwap/haptic/feedback exports platform-free FeedbackEvent, FeedbackPreferences, semanticHaptics, createHapticAdapter(backend) and createNativeHapticAdapter(hostExpoModule, capability). The adapters implement HIG's haptic channel without importing React, DOM, Web Audio, Expo or RN. HIG owns preference storage, event deduplication and cadence; the host supplies backend availability and AppState. API success is never hardware observation.

HapticTarget also accepts host preferences={{ haptics }} and policyEnabled. Application veto and stored preferences gate component intent; sound and motion remain independent. For HIG's physical iOS target, pre-approve eligibility, enable only the physical path and disable debug audio. An iOS tick cannot be canceled after the OS activates its switch. Native Expo operations cannot retract an already submitted tick either.

See the integration guide for mappings, backend injection, no-op defaults, independent channels and validation limits.