
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
expo-haptics
Advanced tools
Provides access to the system's haptics engine on iOS and vibration effects on Android.
The expo-haptics package provides a way to trigger haptic feedback on iOS and Android devices. This can be used to enhance user experience by providing tactile feedback in response to user interactions.
Impact Feedback
This feature allows you to trigger an impact feedback, which is a physical tap or bump. The `impactAsync` function can take different styles such as Light, Medium, and Heavy.
import * as Haptics from 'expo-haptics';
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium);
Notification Feedback
This feature allows you to trigger notification feedback, which is a series of taps that indicate a notification. The `notificationAsync` function can take different types such as Success, Warning, and Error.
import * as Haptics from 'expo-haptics';
Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success);
Selection Feedback
This feature allows you to trigger selection feedback, which is a light tap used to indicate a selection change. The `selectionAsync` function does not take any parameters.
import * as Haptics from 'expo-haptics';
Haptics.selectionAsync();
The react-native-haptic-feedback package provides similar functionalities for triggering haptic feedback on iOS and Android devices. It offers more customization options for feedback patterns and intensities compared to expo-haptics.
The react-native-vibration package allows you to trigger vibration patterns on Android and iOS devices. While it does not offer the same level of haptic feedback customization as expo-haptics, it is useful for simpler vibration needs.
Provides access to the system's haptics engine on iOS and vibration effects on Android.
For managed Expo projects, please follow the installation instructions in the API documentation for the latest stable release.
For bare React Native projects, you must ensure that you have installed and configured the expo
package before continuing.
npx expo install expo-haptics
Run npx pod-install
after installing the npm package.
No additional set up necessary.
This module requires permission to control vibration on the device, it's added automatically.
<!-- Added permissions -->
<uses-permission android:name="android.permission.VIBRATE" />
Contributions are very welcome! Please refer to guidelines described in the contributing guide.
FAQs
Provides access to the system's haptics engine on iOS and vibration effects on Android.
The npm package expo-haptics receives a total of 251,677 weekly downloads. As such, expo-haptics popularity was classified as popular.
We found that expo-haptics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 28 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.