1.1.0 • Published 7 years ago

@tele2/react-native-select-input v1.1.0

Weekly downloads
38
License
MIT
Repository
github
Last release
7 years ago

Demo

iOSAndroid
iOSAndroid

You can try the demo app here.

Installation

npm install @tele2/react-native-select-input --save

Usage

import React, { Component } from 'react';
import SelectInput from '@tele2/react-native-select-input';

class MyComponent extends Component {
  render() {
    <SelectInput
      options={[{
        value: 'my-option-value',
        label: 'My option label',
      }]}
    />
  }
}

export default MyComponent;

You can see more examples in the example app.

API

PropertyTypeRequiredDefault valueDescription
labelstringnonullLabel to be shown on the top of the input.
placeholderstringnostringPlaceholder to be shown if the input has no value.
donestringnostringString that shows on the header of the select input in iOS.
valuestring/numbernonullCurrent input value.
optionsarrayOfyesCheck hereOptions available to be selected.
disabledboolnofalseWhether the input is disabled or not.
loadingboolnofalseWhether the input is on loading state or not.
colorsshapenoCheck hereColors to easily personalize the input.
onChangefunctionnonullFunction to be called whenever the input value is changed.
renderLabelfunctionnonullFunction to render a custom label.
labelPropsobjectnonullProps to be passed to the label <Text /> component.
valuePropsobjectnonullProps to be passed to the value <Text /> component.
renderArrowIconfunctionnonullFunction to render a custom arrow icon.
labelStylecustomnonullCustom label style.
loadingContainerStylecustomnonullCustom style for the loading container.
valueContainerStylecustomnonullCustom style for the value container.
valueStylecustomnonullCustom value style.
containerStylecustomnonullCustom style for the container of the input.
innerContainerStylecustomnonullCustom style for the inner container of the input.
arrowIconnonull
testPropertystringnoProperty for setting a testID (iOS) / accessibilityLabel (Android) for testing

License

MIT © Tele2 Netherlands.

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago