react-native-hold-menu A performant, easy to use hold to open context menu for React Native powered by Reanimated 项目地址: https://gitcode.com/gh_mirrors/re/react-native-hold-menu
React Native Hold Menu 是一个基于 Reanimated 2 构建的高性能、易用的长按上下文菜单组件。它为 React Native 应用提供了类似 iOS 3D Touch 或 Android 长按菜单的交互体验,具有流畅的动画效果和出色的性能表现。
使用 yarn 或 npm 安装核心包:
yarn add react-native-hold-menu
# 或
npm install react-native-hold-menu
组件需要以下依赖项才能正常工作:
yarn add [email protected] react-native-gesture-handler react-native-unimodules expo-blur expo-haptics
由于使用了原生模块,需要进行额外配置:
React Native Gesture Handler
React Native Reanimated v2
React Native Unimodules
性能优化:
主题适配:
交互体验:
根据项目路线图,未来版本将增加:
这个组件特别适合需要增强用户交互体验的 React Native 应用,特别是那些追求 iOS 风格上下文菜单的项目。其性能优势和易用性使其成为 React Native 生态中上下文菜单解决方案的优选之一。
react-native-hold-menu A performant, easy to use hold to open context menu for React Native powered by Reanimated 项目地址: https://gitcode.com/gh_mirrors/re/react-native-hold-menu