react-native-hold-menu-cli
TypeScript icon, indicating that this package has built-in type declarations

0.1.12 • Public • Published

React Native Hold Menu CLI

Reanimated v2 version npm npm runs with expo

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.


hold-menu-preview

Features

  • 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.

Installation

yarn add react-native-hold-menu-cli

Dependencies

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.

Icon

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}>

Getting Started

Check out the documentation website.


Contributors

License

MIT

Show Your Support

Please give a star if you like this project! 🤩

Package Sidebar

Install

npm i react-native-hold-menu-cli

Weekly Downloads

68

Version

0.1.12

License

MIT

Unpacked Size

346 kB

Total Files

219

Last publish

Collaborators

  • minhnndev