# react-native-tap

> Components for detecting different number of Taps and their implementation with common use cases

Latest version **1.0.1** (published 2020-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-tap
pnpm add react-native-tap
yarn add react-native-tap
bun add react-native-tap
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-08-20 |
| First published | 2020-08-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 321 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sarthak Pranesh |
| Maintainers | sarthakpranesh |
| Keywords | react-native, react-native-components, react, mobile, ios, android, tap, tap-components |

## Links

- npm: https://www.npmjs.com/package/react-native-tap
- Repository: https://github.com/sarthakpranesh/react-native-tap
- Homepage: https://github.com/sarthakpranesh/react-native-tap#readme
- Issues: https://github.com/sarthakpranesh/react-native-tap/issues
- npm.io page: https://npm.io/package/react-native-tap

## Dependencies (1)

- [metro-react-native-babel-preset](https://npm.io/package/metro-react-native-babel-preset.md) ^0.62.0

## 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.0.1 (latest) — 2020-08-20

## README

[![npm](https://img.shields.io/npm/v/react-native-tap)](https://www.npmjs.com/package/react-native-tap)
[![npm](https://img.shields.io/npm/dw/react-native-tap)](https://www.npmjs.com/package/react-native-tap)
[![GitHub stars](https://img.shields.io/github/stars/sarthakpranesh/react-native-tap?style=plastic)](https://github.com/sarthakpranesh/react-native-tap/stargazers)

# react-native-tap

Simple React Native components to implement custom and interesting multi tap and long press interactions.

<img src="./ex.gif" height="600" />

<br />

## Installation

Using yarn:
```bash
yarn add react-native-tap
```

Using npm:
```
npm i react-native-tap
```

Dependency: Make sure you have `react-native-gesture-handler` installed

<br />

## Usage

Using Bare multi tap component
```js
import {MultiTap} from 'react-native-tap';
```

Example usage
```
<MultiTap onSingleTap={() => console.log("Single tap")} onDoubleTap={() => console.log("Double tap)}>
    <View style={styles.box}>
        <Text>Tap Me!</Text>
    </View>
</MultiTap>
```

<br />

## Expo Example
Their is expo example present in the `example` directory for you to try out.
Instructions, make sure `expo-cli` is installed
1. `git clone https://github.com/sarthakpranesh/react-native-tap.git`
2. `cd react-native-tap/example`
3. `yarn install`
4. `expo start` and scan the QR code from expo client mobile app

<br />

## Documentation
MultiTap component

|Name   |Description    |Default    |Type |
|---    |---            |---        |---  |
|onSingleTap    |Function called on a single tap on component    | () => {}    |Func   |
|onDoubleTap    |Function called on a double tap on component    | () => {}    |Func   |

<br />

## Future Components

These components will be provided in future versions
|Component Name |Description    |
|---    |---    |
|ReactiveIcon   |Will provide basic animated icons using Animated api in React Native. The component will implement both onSingleTap and onDoubleTap functionalities|

<br />

## Contributions
Feel free to open GitHub issues for feature request, bugs or discussions, and Pull request are always Welcomed!

<br />

## License
[MIT](https://github.com/sarthakpranesh/react-native-tap/blob/master/LICENSE)

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