Skip to content

Commit

Permalink
Add method overview
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuczera authored Oct 20, 2021
1 parent ad81b97 commit ac55b68
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# react-native-haptic-feedback

## Contributions welcome
Expand Down Expand Up @@ -63,15 +64,43 @@ ReactNativeHapticFeedback.trigger("impactLight", options);

| Argument | Description
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `method` | Possible values are "selection", "impactLight", "impactMedium", "impactHeavy", "rigid", "soft", "notificationSuccess", "notificationWarning", "notificationError", "clockTick"(Android only), "contextClick"(Android only), "keyboardPress"(Android only), "keyboardRelease"(Android only), "keyboardTap"(Android only), "longPress"(Android only), "textHandleMove"(Android only), "virtualKey"(Android only), "virtualKeyRelease"(Android only), (default: "selection") |
| `options.enableVibrateFallback` |  iOS only. if haptic feedback is not available (iOS < 10 OR Device < iPhone6s), vibrate with default method (heavy 1s) (default: false) |
| `method` | See methods below
| `options.enableVibrateFallback` | iOS only. if haptic feedback is not available (iOS < 10 OR Device < iPhone6s), vibrate with default method (heavy 1s) (default: false) |
| `options.ignoreAndroidSystemSettings` | Android only. if Haptic is disabled in the Android system settings this will allow ignoring the setting and trigger haptic feeback. (default: false) |

### Method Overview

| Method | Android | iOS |
| :---: | :---: | :---: |
| selection | :heavy_check_mark: | :heavy_check_mark: |
| impactLight | :heavy_check_mark: | :heavy_check_mark: |
| impactMedium | :heavy_check_mark: | :heavy_check_mark: |
| impactHeavy | :heavy_check_mark: | :heavy_check_mark: |
| rigid | :heavy_check_mark: | :heavy_check_mark: |
| soft | :heavy_check_mark: | :heavy_check_mark: |
| notificationSuccess | :heavy_check_mark: | :heavy_check_mark: |
| notificationWarning | :heavy_check_mark: | :heavy_check_mark: |
| notificationError | :heavy_check_mark: | :heavy_check_mark: |
| clockTick | :heavy_check_mark: | |
| contextClick | :heavy_check_mark: | |
| keyboardPress | :heavy_check_mark: | |
| keyboardRelease | :heavy_check_mark: | |
| keyboardTap | :heavy_check_mark: | |
| longPress | :heavy_check_mark: | |
| textHandleMove | :heavy_check_mark: | |
| virtualKey | :heavy_check_mark: | |
| virtualKeyRelease | :heavy_check_mark: | |
| effectClick | :heavy_check_mark: | |
| effectDoubleClick | :heavy_check_mark: | |
| effectHeavyClick | :heavy_check_mark: | |
| effectTick | :heavy_check_mark: | |


### Available methods version 1.6.0 and prior

#### trigger(method, enableVibrateFallback)

| Argument | Description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `method` | Possible values are "selection", "impactLight", "impactMedium", "impactHeavy", "notificationSuccess", "notificationWarning", "notificationError" (default: "selection") |
| `enableVibrateFallback` |  iOS only. if haptic feedback is not available (iOS < 10 OR Device < iPhone6s), vibrate with default method (heavy 1s) |
| `enableVibrateFallback` | iOS only. if haptic feedback is not available (iOS < 10 OR Device < iPhone6s), vibrate with default method (heavy 1s) |

0 comments on commit ac55b68

Please sign in to comment.