Skip to content

Latest commit

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

rn-spinner

NPM versionnpm downloadjs-standard-style

Number Spinner component for react-native.

Install

npm install rn-spinner --save

Usage

// Require
var Spinner = require('rn-spinner');
// 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

About

An extensible number Spinner component for react-native.

Resources

Stars

32 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages