react-native-simple-stepper
Version:
A parity version of the iOS UIStepper.
66 lines (47 loc) • 2.52 kB
Markdown
[](https://reactnative.dev)
[](https://www.npmjs.com/package/react-native-simple-stepper)
[](https://www.npmjs.com/package/react-native-simple-stepper)
[](https://raw.github.com/testshallpass/react-native-simple-stepper/master/LICENSE)
[](https://github.com/testshallpass/react-native-simple-stepper/actions/workflows/ci.yml)
A parity version of the iOS [UIStepper](https://developer.apple.com/reference/uikit/uistepper).

- [Installation](
- [Usage](
- [Text Position](
- [Props](SimpleStepper.tsx)
- [More Examples](./example/App.tsx)
| |
| ------------------------------------------------ |
| `yarn add react-native-simple-stepper` |
| `npm install react-native-simple-stepper --save` |
```tsx
import React from 'react';
import SimpleStepper from 'react-native-simple-stepper';
export default function Example(): React.JSX.Element {
return <SimpleStepper valueChanged={value => console.log(value)} />;
}
```
| left | center (default) | right |
| :-----------------------------------: | :-------------------------------------: | :------------------------------------: |
|  |  |  |
```tsx
import React from 'react';
import SimpleStepper from 'react-native-simple-stepper';
export default function TextPositionExample(): React.JSX.Element {
return <SimpleStepper showText={true} textPosition={'right'} />;
}
```

```tsx
import React from 'react';
import SimpleStepper from 'react-native-simple-stepper';
export default function VerticalExample(): React.JSX.Element {
return <SimpleStepper horizontal={false} />;
}
```