1.0.0 • Published 5 years ago

@sstimac/rn-wheel-picker v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

rn-wheel-picker

JavaScript implementation of the common wheel picker component, that doesn't rely on native components. Only native dependency we use is the <LinearGradient> component, that we use to mask the outer items.

Installation

Usage

import { WheelPicker } from 'rn-wheel-picker'

Props

NameDescriptionDetails
optionsArray of objects with one required property labelarray
onOptionSelectedcallback function returning the selected item from the options arrayfunction
onCancelcallback function invoked on pressing the cancel buttonfunction
activeControls the visibility of the picker windowboolean
CancelButtonOptional cancel button component if you prefer using it over the standard buttons and callbacksComponent
ConfirmButtonOptional confirmation button componentComponent
snapIntervaldelay before snapping animation in msnumber
optionHeightOption heightnumber
optionTextStyleOverrides the option text styleobject, number, array
titleOptional title stringstring
captionOptional caption stringstring

TODOS

  • Add looping
  • Add customizable number of options
  • Open more parts of the component to custom style
  • Add CocoaPods support / auto linking