A performant, easy to use hold to open context menu for React Native CLI powered by Reanimated. 🔥
This package is experimental and still in progress. Using it in production is not preffered yet.
- Powered with Reanimated v3. 🚀
- Smooth interactions & animations.
- Supports dark/light Mode. 🌚 🌝
- Supports device orientation change.
- Compatible with React Native CLI (instead off Expo).
- Written in
TypeScript
.
yarn add react-native-hold-menu-cli
This library needs these dependencies to be installed in your project before you can use it:
yarn add react-native-reanimated react-native-gesture-handler react-native-unimodules @react-native-community/blur react-native-haptic-feedback
React Native Gesture Handler needs extra steps to finalize its installation, please follow their installation instructions.
React Native Reanimated needs extra steps to finalize its installation, please follow their installation instructions.
If you want to use an icon in your menu items, you need to set your Icon component to HoldMenuProvider
to be able to use it. Then you can put just the icon's name in the menu item list with the icon
prop like below.
<Provider iconComponent={Icon} />
note Icon
can be used with just react-native-vector-icons
for now.
import FeatherIcon from 'react-native-vector-icons/Feather';
/* ... */
<HoldMenuProvider iconComponent={FeatherIcon}>
Check out the documentation website.
Please give a star if you like this project! 🤩