1.1.0 • Published 3 years ago

react-native-radio-button-custom v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

React Native Radio Button.

react-native-radio-button-custom

The npm package for react native radio button, where we can customised the radio button component to any design with its generic features.

Inatsallation:

With npm

npm install react-native-radio-button-custom --save

With yarn

yarn add react-native-radio-button-custom

Usage:

import RadioGroup from 'react-native-radio-button-custom';

 const data = [
    {
      id: 0,
      key: 'male',
      name: 'Male',
    },
    {
      id: 1,
      key: 'female',
      name: 'Female',
    },
    {
      id: 2,
      key: 'others',
      name: 'Others',
    },
  ];

 <RadioGroup 
    items={data} 
    onItemSelect={onItemSelect} 
    />
PropertyTypeRequiredDescription
itemsArray of objecttrueActual array of data input
onItemSelectFunctiontrueA handler function for item selection.
customBooleanfalseTo render a custom radio button, default value = false.
labelStyleObjectfalseThe label style object.
selectedLabelStyleObjectfalseThe selected label style object.
containerStyleObjectfalseThe whole Radio group label style object.
buttonColorStringfalseThe radio button color, Default value '#2351AA'.
orientationStringfalseThe orientation of Radio Group, vertical or horizontal, Default is 'vertical'.