JSPM

react-native-nitro-vibrate

0.3.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q34702F
  • License MIT

Access the native haptics interface with React Native.

Package Exports

  • react-native-nitro-vibrate

Readme

react-native-nitro-vibrate

Access the full native haptics interface on iOS and Android.

Usage

Requires NitroModules react-native-nitro-modules installed in your project.

import { Vibrate } from 'react-native-nitro-vibrate'

Vibrate.vibrate('light' | 'medium' | 'heavy' | 'soft' | 'rigid')

Permissions

Haptics requires Vibration permissions on Android, add this to your AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.VIBRATE" />
</manifest>