0.4.4 • Published 1 year ago

react-native-wheel-picky v0.4.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

⛏️ react-native-wheel-picky

This is not original but inspired by react-native-picky

An awesome native wheel picker component for react-native.

Features

  • Supports multiple columns ✅

  • Supports looping ✅

  • Native Android and iOS components for improved performance ✅

  • Typescript ✅

Preview

PreviewiOSAndroid
Single Column
Multiple Columns with looping

Installation

yarn add react-native-wheel-picky

Quick Start

import { Picker, PickerColumn, PickerItem } from 'react-native-wheel-picky';

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 />

PropertyTypeDescriptionPlatformDefault
loopbooleanEnable looping optionsiOS, Androidfalse
styleobjectView style propiOS, Android
onChangefunctionA callback function when a value is changed in any columniOS, Android
numberOfLinesnumberThe number of lines for each row in a columniOS1
hasCurtainbooleanEnable the curtain to highlight the selected valueAndroidtrue
curtainColorstringColor of the curtainAndroidhsla(0, 0%, 0%, 0.1)
hasIndicatorbooleanEnable the indicator to highlight the selected valueAndroidtrue
indicatorColorstringColor of the indicatorAndroidhsla(0, 0%, 0%, 0.1)
indicatorSizenumberThe size of the indicatorAndroid1
itemSpacenumberThe amount of space between itemsAndroid12
textColorstringThe color of the item textAndroid#000000
textSizenumberThe size of the item textAndroid20

<PickerColumn />

PropertyTypeDescriptionPlatformDefault
selectedValuestring | numberThe selected valueiOS, Android
onChangefunctionA callback function if the value is changed in this columniOS, Android
widthnumberThe width of this columniOS, AndroidTakes up the available space

<PickerItem />

PropertyTypeDescriptionPlatformDefault
labelstringThe label of the itemiOS, Android
valuestring | numberThe value of the itemiOS, Android
testIDstringThe testID of the itemiOS
colorstringThe color of the item textiOS

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

0.4.4

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago