PHPackages                             blessedzulu/nativephp-mobile-haptics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. blessedzulu/nativephp-mobile-haptics

ActiveNativephp-plugin[Utility &amp; Helpers](/categories/utility)

blessedzulu/nativephp-mobile-haptics
====================================

Haptic feedback plugin for NativePHP Mobile - impact, notification, selection, vibrate &amp; pattern. Fork of graymatter/nativephp-mobile-haptics, modernised for Laravel 13.

v1.1.1(1mo ago)06↓88.9%MITPHPPHP ^8.2

Since Jun 2Pushed 1w agoCompare

[ Source](https://github.com/blessedzulu/nativephp-mobile-haptics)[ Packagist](https://packagist.org/packages/blessedzulu/nativephp-mobile-haptics)[ RSS](/packages/blessedzulu-nativephp-mobile-haptics/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

NativePHP Mobile Haptics
========================

[](#nativephp-mobile-haptics)

Haptic feedback plugin for [NativePHP Mobile](https://nativephp.com) - impact, notification, selection, vibrate &amp; pattern.

Features
--------

[](#features)

- **5 haptic types**: impact, notification, selection, raw vibrate, and custom patterns
- **Cross-platform**: native iOS (`UIFeedbackGenerator`) and Android (`VibrationEffect`) implementations
- **PHP + JavaScript**: use from Livewire/Blade or Vue/React/Inertia
- **Graceful degradation**: returns `false` on simulators or missing hardware
- **Zero config**: install and use - no publish, no migrations

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11, 12 or 13
- NativePHP Mobile 3.0+

Installation
------------

[](#installation)

```
composer require blessedzulu/nativephp-mobile-haptics
```

The service provider and facade are auto-discovered.

Usage (PHP)
-----------

[](#usage-php)

```
use BlessedZulu\NativePHP\Mobile\Haptics\Facades\Haptics;

// Impact feedback - for button taps, collisions, UI emphasis
Haptics::impact('light');    // light, medium (default), heavy, rigid, soft

// Notification feedback - for async operation results
Haptics::notification('success');  // success (default), warning, error

// Selection feedback - for pickers, sliders, toggles
Haptics::selection();

// Raw vibration (ms) - native on Android, approximated on iOS
Haptics::vibrate(300);

// Vibration pattern [vibrate, pause, vibrate, pause, ...]
Haptics::pattern([100, 50, 200, 50, 100]);
```

All methods return `bool` - `true` on success, `false` on failure or missing hardware.

Usage (JavaScript)
------------------

[](#usage-javascript)

```
import { haptics } from '@blessedzulu/nativephp-mobile-haptics';

await haptics.impact('heavy');
await haptics.notification('error');
await haptics.selection();
await haptics.vibrate(200);
await haptics.pattern([100, 50, 200]);
```

Or import individual functions:

```
import { impact, notification, selection } from '@blessedzulu/nativephp-mobile-haptics';

await impact('medium');
```

API Reference
-------------

[](#api-reference)

MethodParametersDefaultDescription`impact($style)``light`, `medium`, `heavy`, `rigid`, `soft``medium`Impact haptic feedback`notification($type)``success`, `warning`, `error``success`Notification haptic feedback`selection()`--Selection tick feedback`vibrate($ms)``1` - `5000``200`Raw vibration in milliseconds`pattern($array)``[vibrate, pause, ...]`-Custom vibration patternPlatform Differences
--------------------

[](#platform-differences)

FeatureiOSAndroidImpactNative (`UIImpactFeedbackGenerator`)Native (`VibrationEffect.createOneShot`)NotificationNative (`UINotificationFeedbackGenerator`)Native (predefined effects API 29+, waveform fallback)SelectionNative (`UISelectionFeedbackGenerator`)Native (`EFFECT_TICK` API 29+, short vibration fallback)VibrateApproximated via repeated impactsNative (`createOneShot`)PatternApproximated via timed impactsNative (`createWaveform`)PermissionNone required`VIBRATE` (auto-granted)Min versioniOS 13.0API 26 (Android 8.0)Disabling Haptics
-----------------

[](#disabling-haptics)

Use standard conditional logic:

```
if ($user->prefersHaptics()) {
    Haptics::impact('medium');
}
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

A fork of [graymatter/nativephp-mobile-haptics](https://github.com/graymattertechnology/nativephp-mobile-haptics), updated for Laravel 13 and current NativePHP Mobile. Full credit for the original implementation goes to GrayMatter.

License
-------

[](#license)

MIT - see [LICENSE](LICENSE).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance95

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

52d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43051370?v=4)[Blessed Zulu](/maintainers/blessedzulu)[@blessedzulu](https://github.com/blessedzulu)

---

Top Contributors

[![blessedzulu](https://avatars.githubusercontent.com/u/43051370?v=4)](https://github.com/blessedzulu "blessedzulu (8 commits)")

---

Tags

pluginlaravelmobilenativephphapticsvibration

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/blessedzulu-nativephp-mobile-haptics/health.svg)

```
[![Health](https://phpackages.com/badges/blessedzulu-nativephp-mobile-haptics/health.svg)](https://phpackages.com/packages/blessedzulu-nativephp-mobile-haptics)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k106](/packages/nativephp-mobile)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
