1.0.5 • Published 5 years ago

react-native-number-spinner-v2 v1.0.5

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

react-native-number-spinner-v2

NPM version npm download js-standard-style

Number Spinner component for react-native.

Based on https://github.com/skiddolo/react-native-number-spinner

Npm Install

npm install react-native-number-spinner-v2 --save

Yarn Install

yarn add react-native-number-spinner-v2

Usage

// Require
import Spinner from 'react-native-number-spinner-v2';

// Use
<Spinner max={10}
         min={2}
         default={5}
         color="#f60"
         numColor="#f60"
         onNumChange={(num)=>{console.log(num)}}

Props

PropertyDescriptionTypeDefaultNote
maxnumber0
minnumber99
defaultdefault number of the Spinnernumber0You can define either default or value.
valuecontrolled value of the SpinnernumberundefinedIf value is defined, then the value can change only via the property. This means that onNumChange must be defined and change external state.
colorcustom color of the Spinnerstring'#33c9d6'
numColorcustom number colorstring'#333'
numBgColorbackground color of number buttonstring'white'
onNumChangeget the number of the Spinnerfunc
showBordershow the border of the Spinner or notbooltrue
disableddisable the Spinner or notboolfalse
fontSizecustom fontSize of the text input in the Spinnernumber14
btnFontSizecustom fontSize of buttons in the Spinnernumber14
buttonTextColorcustom color of the button in the Spinnerstring'white'
widthcustom width of the Spinnernumber90
heightcustom height of the Spinnernumber30

Screenshot

Feedback

Issues

License

The MIT License