{"id":4583,"url":"https://github.com/AppAndFlow/react-native-haptic","last_synced_at":"2025-08-04T01:32:45.790Z","repository":{"id":15798023,"uuid":"78779546","full_name":"AppAndFlow/react-native-haptic","owner":"AppAndFlow","description":"iOS 10 + haptic feedback for React Native applications","archived":false,"fork":false,"pushed_at":"2022-04-09T01:20:26.000Z","size":26515,"stargazers_count":201,"open_issues_count":17,"forks_count":28,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-22T01:55:19.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AppAndFlow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-12T19:30:38.000Z","updated_at":"2023-11-14T03:28:55.000Z","dependencies_parsed_at":"2022-08-07T08:01:21.433Z","dependency_job_id":null,"html_url":"https://github.com/AppAndFlow/react-native-haptic","commit_stats":null,"previous_names":["charlesvinette/react-native-haptic"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppAndFlow%2Freact-native-haptic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppAndFlow%2Freact-native-haptic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppAndFlow%2Freact-native-haptic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppAndFlow%2Freact-native-haptic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppAndFlow","download_url":"https://codeload.github.com/AppAndFlow/react-native-haptic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228582488,"owners_count":17940587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:17:17.040Z","updated_at":"2024-12-07T08:30:45.378Z","avatar_url":"https://github.com/AppAndFlow.png","language":"Objective-C","readme":"\n# react-native-haptic\n\n## Install the package in your project directory\n\n`$ npm install react-native-haptic --save`\n\n#### Link the library to the XCode proj of your React Native project (ios -\u003e \"your_project.xcodeproj\").\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ `-react-native-haptic` and add `ReactNativeHaptic.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libReactNativeHaptic.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. Run your project (`Cmd+R`)\u003c\n\n## How to use\n```javascript  \n  import ReactNativeHaptic from 'react-native-haptic';\n  \n  \u003cTouchableHighlight style={styles.wrapper} onPress={() =\u003e ReactNativeHaptic.generate('notification')}\u003e\n  ```\n## Example\n![alt tag](http://imgur.com/1eTeFeR.png)\n\nI would suggest to run the example directly on your device, since chances are you won't feel the feedback in the simulator ;)\n## Methods\n```javascript\n  /**\n   * @static\n   * @method prepare\n   * @description Prepares the Taptic Engine (Awaken state). Usually used seconds before triggering a feedback.\n   * This is optional, mostly used when the feedback needs to be synced with sound.\n   *\n   */\n  \n    static prepare() {\n      ReactNativeHaptic.prepare();\n    }\n  \n  /**\n   * @static\n   * @method Generate\n   * @description Triggers haptic feedback of type :type\n   * @param type Type of haptic feedback\n   */\n\n    static generate(type: 'impact' | 'notification' | 'selection' | 'impactLight' | 'impactMedium' | 'impactHeavy' | 'notificationError' | ' notificationSuccess' | 'notificationWarning') {\n      ReactNativeHaptic.generate(type);\n    }\n  ```\n\n","funding_links":[],"categories":["Components"],"sub_categories":["System"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAppAndFlow%2Freact-native-haptic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAppAndFlow%2Freact-native-haptic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAppAndFlow%2Freact-native-haptic/lists"}