Nitrogen Poisonous Monoxide

    react-swipe-to-close-modal
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.0 • Public • Published

    React Swipe To Close Modal

    A React Modal component that closes on swipe touch

    Demo

    Installation

    npm install react-swipe-to-close-modal

    Usage

    import Modal from "react-swipe-to-close-modal";
    
    const NiceComponent = () => {
      const [isOpen, setIsOpen] = useState(false);
    
      const close = () => setIsOpen(false);
    
      return (
        <Modal isOpen={isOpen} close={close}>
          // your UI code here
        </Modal>
      );
    };

    Install

    npm i react-swipe-to-close-modal

    DownloadsWeekly Downloads

    4

    Version

    1.2.0

    License

    ISC

    Unpacked Size

    21.2 kB

    Total Files

    11

    Last publish

    Collaborators

    • azabraao