All Projects → ThakurBallary → react-native-radio-buttons-group

ThakurBallary / react-native-radio-buttons-group

Licence: MIT license
Simple, best and easy to use radio buttons for react native apps.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to react-native-radio-buttons-group

AMChoice
Radio Button and check box for iOS
Stars: ✭ 45 (-68.97%)
Mutual labels:  radio, button, radio-buttons
Multipicker
Form styling plugin for jQuery
Stars: ✭ 90 (-37.93%)
Mutual labels:  form, radio-buttons
Examples Win32
Shows how to use Win32 controls by programming code (c++17).
Stars: ✭ 22 (-84.83%)
Mutual labels:  button, radio-buttons
Tristatetogglebutton
Customizable tri-state toggle button (with three states, three state toggle) for Android
Stars: ✭ 198 (+36.55%)
Mutual labels:  button, radio-buttons
Heyui
🎉UI Toolkit for Web, Vue2.0 http://www.heyui.top
Stars: ✭ 2,373 (+1536.55%)
Mutual labels:  button, form
react-native-touchable
React-Native button helper library
Stars: ✭ 46 (-68.28%)
Mutual labels:  button, react-native-component
Segmentedbutton
Segmented Control with animation for Android API 12+
Stars: ✭ 352 (+142.76%)
Mutual labels:  button, radio-buttons
Radiorealbutton
A custom radio button for Android API 12+
Stars: ✭ 250 (+72.41%)
Mutual labels:  button, radio-buttons
Vxe Table
🐬 vxe-table vue 表格解决方案
Stars: ✭ 4,242 (+2825.52%)
Mutual labels:  radio, form
React Native Selectmultiple Button
A button (or a grouped buttons) supporting multiple or radio selection by building with React Native. https://github.com/danceyoung/selectmultiplebuttons for Swift.
Stars: ✭ 72 (-50.34%)
Mutual labels:  radio, button
react-native-animated-radio-button
Fully customizable animated radio button for React Native
Stars: ✭ 25 (-82.76%)
Mutual labels:  radio, button
lomake
HTML Form generator from Go structs
Stars: ✭ 12 (-91.72%)
Mutual labels:  form
DroidValidatorLight
Android form validation library
Stars: ✭ 32 (-77.93%)
Mutual labels:  form
react-native-ios-modal
A react-native component for displaying a modal on iOS by natively wrapping a react-native view inside a UIViewController and presenting it.
Stars: ✭ 94 (-35.17%)
Mutual labels:  react-native-component
react-native-chat-ui
Actively maintained, community-driven chat UI implementation with an optional Firebase BaaS.
Stars: ✭ 168 (+15.86%)
Mutual labels:  react-native-component
react-native-uiw
A UI component library based on React Native (Android & iOS).
Stars: ✭ 28 (-80.69%)
Mutual labels:  react-native-component
contact-officials
Form definitions powering Resistbot's electronic deliveries to elected officials in the United States.
Stars: ✭ 29 (-80%)
Mutual labels:  form
react-native-select-pro
React Native dropdown (select) component developed by Mobile Reality
Stars: ✭ 79 (-45.52%)
Mutual labels:  react-native-component
Online-Radio
Online Tamil Radio channels. Inspired by http://radio.garden
Stars: ✭ 15 (-89.66%)
Mutual labels:  radio
WMZForm
一个功能强大的表单组件,可自定义(A powerful form component that can be customized)
Stars: ✭ 38 (-73.79%)
Mutual labels:  form

React Native Radio Buttons Group

Simple, best and easy to use radio buttons for react native apps.

npm LICENSE MIT

NPM

Getting Started

Just a sneak peek (lots more can be done)

DEMO

Installation

npm i react-native-radio-buttons-group --save

or

yarn add react-native-radio-buttons-group

Usage

Javascript Example
App.js
import React, { useState } from 'react';
import RadioGroup from 'react-native-radio-buttons-group';

const radioButtonsData = [{
    id: '1', // acts as primary key, should be unique and non-empty string
    label: 'Option 1',
    value: 'option1'
}, {
    id: '2',
    label: 'Option 2',
    value: 'option2'
}]

export default function App() {

    const [radioButtons, setRadioButtons] = useState(radioButtonsData)

    function onPressRadioButton(radioButtonsArray) {
        setRadioButtons(radioButtonsArray);
    }

    return (
        <RadioGroup 
            radioButtons={radioButtons} 
            onPress={onPressRadioButton} 
        />
    );

}
Typescript Example
App.tsx
import React, { useState } from 'react';
import RadioGroup, {RadioButtonProps} from 'react-native-radio-buttons-group';

const radioButtonsData: RadioButtonProps[] = [{
    id: '1', // acts as primary key, should be unique and non-empty string
    label: 'Option 1',
    value: 'option1'
}, {
    id: '2',
    label: 'Option 2',
    value: 'option2'
}]

export default function App() {

    const [radioButtons, setRadioButtons] = useState<RadioButtonProps[]>(radioButtonsData)

    function onPressRadioButton(radioButtonsArray: RadioButtonProps[]) {
        setRadioButtons(radioButtonsArray);
    }

    return (
        <RadioGroup 
            radioButtons={radioButtons} 
            onPress={onPressRadioButton} 
        />
    );

}

Props

RadioButton

Key Type Required Default Valid Values
borderColor string no color css color formats
color string no #444 css color formats
containerStyle object no react style
description string no any string
descriptionStyle object no react style
disabled boolean no false true / false
id string yes unique string
label string no any string
labelStyle object no react style
layout enum no row row / column
onPress function no any function
selected boolean no false true / false
size number no 24 positive numbers
value string no any string

RadioGroup

Key Type Required Default Valid Values
containerStyle object no react style
layout enum no column row / column
onPress function no any function
radioButtons array yes arrary of RadioButton objects
Horizontal (side by side)
<RadioGroup 
    radioButtons={radioButtons} 
    onPress={onPressRadioButton} 
    layout='row'
/>

Contributions

Fork and create a pull request

License

MIT License

Stargazers over time

Stargazers over time

Sponsor

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].