# react-swipe-to-close-modal

> A React Modal component that closes on swipe touch ✨

Latest version **1.4.0** (published 2022-11-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-swipe-to-close-modal
pnpm add react-swipe-to-close-modal
yarn add react-swipe-to-close-modal
bun add react-swipe-to-close-modal
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2022-11-24 |
| First published | 2022-07-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 19.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | azabraao |
| Maintainers | azabraao |
| Keywords | react, swipe, draggable, modal, swipe to close modal |

## Links

- npm: https://www.npmjs.com/package/react-swipe-to-close-modal
- Repository: https://github.com/azabraao/react-swipe-to-close-modal
- Homepage: https://github.com/azabraao/react-swipe-to-close-modal#readme
- Issues: https://github.com/azabraao/react-swipe-to-close-modal/issues
- npm.io page: https://npm.io/package/react-swipe-to-close-modal

## Dependencies (2)

- [clsx](https://npm.io/package/clsx.md) ^1.2.1
- [@azabraao/react-draggable](https://npm.io/package/@azabraao/react-draggable.md) ^4.5.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.4.0 (latest) — 2022-11-24
- 1.3.0 — 2022-11-05
- 1.2.0 — 2022-08-12
- 1.1.2 — 2022-07-30
- 1.1.1 — 2022-07-30
- 1.1.0 — 2022-07-30
- 1.0.5 — 2022-07-30
- 1.0.4 — 2022-07-30
- 1.0.3 — 2022-07-30
- 1.0.2 — 2022-07-30
- 1.0.1 — 2022-07-30
- 1.0.0 — 2022-07-30

## README

# React Swipe To Close Modal

A React Modal component that closes on swipe touch ✨

[Demo](https://codesandbox.io/s/react-swipe-to-close-modal-qfsyp7)

## Installation

```bash
npm install react-swipe-to-close-modal
```

## Usage

```javascript
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>
  );
};
```

---
_Source: https://npm.io/package/react-swipe-to-close-modal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
