# react-native-roller-picker

> react-native picker component

Latest version **1.0.29** (published 2024-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-roller-picker
pnpm add react-native-roller-picker
yarn add react-native-roller-picker
bun add react-native-roller-picker
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.29 |
| Published | 2024-04-29 |
| First published | 2022-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 100.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | levi-li-yi |
| Maintainers | levi-li-yi |
| Keywords | react-native, ios, android, picker, wheel |

## Links

- npm: https://www.npmjs.com/package/react-native-roller-picker
- Repository: https://github.com/levi-li-yi/react-native-roll-picker
- Homepage: https://github.com/levi-li-yi/react-native-roll-picker#readme
- Issues: https://github.com/levi-li-yi/react-native-roll-picker/issues
- npm.io page: https://npm.io/package/react-native-roller-picker

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.29 (latest) — 2024-04-29
- 1.0.28 — 2024-04-29
- 1.0.25 — 2024-04-28
- 1.0.24 — 2024-04-26
- 1.0.23 — 2024-04-26
- 1.0.22 — 2024-04-26
- 1.0.21 — 2024-04-26
- 1.0.20 — 2024-04-26
- 1.0.19 — 2024-04-26
- 1.0.18 — 2024-04-26
- 1.0.17 — 2024-04-26
- 1.0.16 — 2024-04-26
- 1.0.15 — 2024-04-26
- 1.0.14 — 2024-04-26
- 1.0.13 — 2024-04-26
- … 12 more at https://npm.io/package/react-native-roller-picker/versions

## README

# ⛏️ react-native-roller-picker

An awesome native wheel picker component for react-native.

## Features

- multiple columns ✅

- looping ✅

- Native Android components for improved performance ✅

- Typescript ✅

## Installation

```sh
yarn add react-native-roller-picker
```

## Quick Start

```tsx
import { Picker, PickerColumn, PickerItem } from 'react-native-roller-picker';

export const Demo = () => (
  <Picker>
    <PickerColumn>
      <PickerItem label="Monday" value="Monday" />
      <PickerItem label="Tuesday" value="Tuesday" />
      <PickerItem label="Wednesday" value="Wednesday" />
      <PickerItem label="Thursday" value="Thursday" />
      <PickerItem label="Friday" value="Friday" />
    </PickerColumn>
  </Picker>
);
```

## Props

### `<Picker />`

| Property       | Type     | Description                                               | Platform     | Default              |
| -------------- | -------- | --------------------------------------------------------- | ------------ | -------------------- |
| loop           | boolean  | Enable looping options                                    | iOS, Android | false                |
| style          | object   | View style prop                                           | iOS, Android |                      |
| onChange       | function | A callback function when a value is changed in any column | iOS, Android |                      |
| numberOfLines  | number   | The number of lines for each row in a column              | iOS          | 1                    |
| hasCurtain     | boolean  | Enable the curtain to highlight the selected value        | Android      | true                 |
| curtainColor   | string   | Color of the curtain                                      | Android      | hsla(0, 0%, 0%, 0.1) |
| hasIndicator   | boolean  | Enable the indicator to highlight the selected value      | Android      | true                 |
| indicatorColor | string   | Color of the indicator                                    | Android      | hsla(0, 0%, 0%, 0.1) |
| indicatorSize  | number   | The size of the indicator                                 | Android      | 1                    |
| itemSpace      | number   | The amount of space between items                         | Android      | 12                   |
| textColor      | string   | The color of the item text                                | Android      | #000000              |
| textSize       | number   | The size of the item text                                 | Android      | 20                   |

### `<PickerColumn />`

| Property      | Type             | Description                                                | Platform     | Default                      |
| ------------- | ---------------- | ---------------------------------------------------------- | ------------ | ---------------------------- |
| selectedValue | string \| number | The selected value                                         | iOS, Android |                              |
| onChange      | function         | A callback function if the value is changed in this column | iOS, Android |                              |
| width         | number           | The width of this column                                   | iOS, Android | Takes up the available space |

### `<PickerItem />`

| Property | Type             | Description                | Platform     | Default |
| -------- | ---------------- | -------------------------- | ------------ | ------- |
| label    | string           | The label of the item      | iOS, Android |         |
| value    | string \| number | The value of the item      | iOS, Android |         |
| testID   | string           | The testID of the item     | iOS          |         |
| color    | string           | The color of the item text | iOS          |         |

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

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