Skip to content

A super simple react-native implementation of the classic UIStepper from iOS

License

Notifications You must be signed in to change notification settings

peteleco/react-native-simple-stepper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-simple-stepper

Platform npm version npm version License

screenshot

A super simple react-native implementation of the classic UIStepper from iOS. Check out the props below for customization.

Installation

npm i react-native-simple-stepper --save

Usage

import SimpleStepper from 'react-native-simple-stepper'
//...
render() {
  return (
    <SimpleStepper valueChanged={(value) => this.valueChanged(value)} />
  )
}
valueChanged(value) {
  // ...
}
//...

Demo

screenshot

Props

| Name | Type | Description | Default | ------------ | ------------- | ------------ |------------ |------------ | | initialValue | Number | initial value | 0 | minimumValue | Number | minimum value | 0 | maximumValue | Number | maximum value | 10 | stepValue | Number | step value (i.e. increment by 10) | 1 | backgroundColor | String | background color | transparent | tintColor | String | color for border, divider and images | blue | underlayColor | String | tap color | lightgray | padding | Number | stepper padding | 4 | valueChanged | Function | Fires when the value changes and the value will be passed down for processing like display or calculations | null | incrementImage | String or Number | network or local image | require('./assets/increment.png') | decrementImage | String or Number | network or local image | require('./assets/decrement.png') | tintOnIncrementImage | Boolean | whether or not you want tintColor applied to increment image | true | tintOnDecrementImage | Boolean | whether or not you want tintColor applied to decrement image | true | imageHeight | Number | network image height | 36 | imageWidth | Number | network image width | 36

About

A super simple react-native implementation of the classic UIStepper from iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 54.6%
  • Objective-C 26.9%
  • Python 10.0%
  • Java 8.5%