# react-native-number-view

> A simple React Native number counter component.

Latest version **1.0.1** (published 2019-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-number-view
pnpm add react-native-number-view
yarn add react-native-number-view
bun add react-native-number-view
```

## 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 | 2019-09-07 |
| First published | 2019-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 52.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | React Native Nigeria Community |
| Maintainers | reactnativeng |
| Keywords | number, react, react, native |

## Links

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

## 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) — 2019-09-07

## README

# **React Native Number View**

<img src="img/img1.png" alt="image1" style="" />

![image1](img/img2.png)

<img src="img/img3.png" alt="image1" style="" />

This is a simple React Native number counter component. 



### Installation

Add react-native-number-view to your project by executing

```
$  npm install react-native-number-view
or
$ yarn add react-native-number-view
```



> and that's it, you're all good to go!



### Usage

```javascript
/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, {Component} from 'react';
import {View} from 'react-native';
import {NumberView} from 'react-native-number-view'
 
type Props = {};
export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
          <NumberView
            enableDefaultStyles={true}
            themeColor="#3F6D2A"
            leftContent={<Text>😔</Text>}
            rightContent={<Text>😃</Text>}
            onValueChange={(newVal)=>{alert(newVal)}}
            onDecrement={()=>{alert('decremented')}}
            onIncrement={()=>{alert('Incremented')}}
          />
      </View>
    );
  }
}

```





## API's

| Name                          | Use                                        | Default Values |
| ----------------------------- | ------------------------------------------ | -------------- |
| leftContent                   | Content to be displayed on the left        | None           |
| rightContent                  | Content to be displayed on the Right       | None           |
| onValueChange                 | Callback which return new value            | None           |
| onDecrement                   | callback each time value is decremented    | None           |
| onIncrement                   | callback each time value is incremented    | None           |
| themeColor                    | Use to set a theme color(only accepts HEX) | none           |
| enableDefaultStyles (boolean) | enable or disable preset styles            | True           |
| initialValue                  | counters initial value                     | 0              |
|                               |                                            |                |



## Contributions

What to help make this package even more awesome? [Read how to contribute](https://github.com/react-native-nigeria/react-native-number-view/blob/master/contribution.md)



## Licensing

This project is licensed under MIT license.



### Don't forget to star, like and share :)

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