Socket
Socket
Sign inDemoInstall

modal-swipe-up

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    modal-swipe-up

Modal Full page with transition from top to bottom and swipe up gesture


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

modal-swipe-up

React Native Modal Swipe-Up

modal-swipe-up is a swipeable, easy to use Modal for your React Native projects. You can close the modal by swiping up with pan gestures. Feel free to redesign inside of the Modal.


⚙️ Installation

To install the package;

$ npm i modal-swipe-up

✅ It is done!

🚀 How to use

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

import ModalSwipeUp from 'modal-swipe-up';

export default App = () => {
  const [modalProps, setModalProps] = useState({
   // ...or any prop you want
  });
  const [isModalActive, setIsModalActive] = useState(false);

  const closeModal = () => {
    setIsModalActive(false);
  };

  return (
    <View style={styles.container}>
      <Text style={styles.welcome}>Welcome to React Native!</Text>
      <Text style={styles.instructions}>To get started, edit App.js</Text>
        <ModalSwipeUp showModal={isModalActive} 
          onPressClose={closeModal}
          closeHeight={200}>
        <PanelContent /> {/* Your Content Here */}
       </ModalSwipeUp>
    </View>
  );
};

☝️ Options


PropertiesTypeDescriptionDefault
showModalboolShow/Hide the modalfalse
onPressCloseFunctionFired when the modal is closed
closeHeightnumberSet minimum height for swipe up and close modal
onOpenFunctionFired when the modal is opened
⭐️ Show Your Support

Please give a ⭐️ if this project helped you!

👏 Contributing

If you have any questions or requests or want to contribute to modal-swipe-upl, please write the issue or give me a Pull Request freely.

Keywords

FAQs

Last updated on 16 Mar 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc