Gathering detailed insights and metrics for react-native-radio-buttons-group
Gathering detailed insights and metrics for react-native-radio-buttons-group
Gathering detailed insights and metrics for react-native-radio-buttons-group
Gathering detailed insights and metrics for react-native-radio-buttons-group
npm install react-native-radio-buttons-group
Accessibility
Published on 30 Sept 2023
Accessibility
Published on 27 Aug 2023
v3.0.0 zero dependencies
Published on 11 May 2023
v2.3.1 added devDependencies
Published on 11 Feb 2023
v2.3.0 add border size as optional property
Published on 02 Jan 2023
v2.2.11 add description field
Published on 06 Jun 2022
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
271 Stars
120 Commits
71 Forks
3 Watching
2 Branches
16 Contributors
Updated on 27 Nov 2024
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
-6.5%
2,717
Compared to previous day
Last week
-2%
14,072
Compared to previous week
Last month
2.8%
62,557
Compared to previous month
Last year
36.2%
582,330
Compared to previous year
No dependencies detected.
Simple, best and easy to use radio buttons for react native apps.
1npm i react-native-radio-buttons-group --save
or
1yarn add react-native-radio-buttons-group
1import React, { useMemo, useState } from 'react'; 2import RadioGroup from 'react-native-radio-buttons-group'; 3 4export default function App() { 5 6 const radioButtons = useMemo(() => ([ 7 { 8 id: '1', // acts as primary key, should be unique and non-empty string 9 label: 'Option 1', 10 value: 'option1' 11 }, 12 { 13 id: '2', 14 label: 'Option 2', 15 value: 'option2' 16 } 17 ]), []); 18 19 const [selectedId, setSelectedId] = useState(); 20 21 return ( 22 <RadioGroup 23 radioButtons={radioButtons} 24 onPress={setSelectedId} 25 selectedId={selectedId} 26 /> 27 ); 28 29} 30
1import React, { useMemo, useState } from 'react'; 2import RadioGroup, {RadioButtonProps} from 'react-native-radio-buttons-group'; 3 4export default function App() { 5 6 const radioButtons: RadioButtonProps[] = useMemo(() => ([ 7 { 8 id: '1', // acts as primary key, should be unique and non-empty string 9 label: 'Option 1', 10 value: 'option1' 11 }, 12 { 13 id: '2', 14 label: 'Option 2', 15 value: 'option2' 16 } 17 ]), []); 18 19 const [selectedId, setSelectedId] = useState<string | undefined>(); 20 21 return ( 22 <RadioGroup 23 radioButtons={radioButtons} 24 onPress={setSelectedId} 25 selectedId={selectedId} 26 /> 27 ); 28 29} 30
Key | Type | Required | Default | Valid Values |
---|---|---|---|---|
accessibilityLabel | string | no | Value of label | any string |
borderColor | string | no | color | css color formats |
borderSize | number | 2 | positive numbers | |
color | string | no | #444 | css color formats |
containerStyle | object | no | react style | |
description | ReactNode or string | no | any react node or string | |
descriptionStyle | object | no | react style, applied only if description is a string | |
disabled | boolean | no | false | true / false |
id | string | yes | unique string | |
label | ReactNode or string | no | any react node or string | |
labelStyle | object | no | react style, applied only if label is a string | |
layout | enum | no | row | row / column |
onPress | function | no | any function | |
selected | boolean | no | false | true / false |
size | number | no | 24 | positive numbers |
testID | string | no | any string | |
value | string | no | any string |
Key | Type | Required | Default | Valid Values |
---|---|---|---|---|
accessibilityLabel | string | no | any string | |
containerStyle | object | no | react style | |
labelStyle | object | no | react style | |
layout | enum | no | column | row / column |
onPress | function | no | any function | |
radioButtons | array | yes | array of RadioButton objects | |
selectedId | string | no | unique string | |
testID | string | no | any string |
1<RadioGroup 2 radioButtons={radioButtons} 3 onPress={onPressRadioButton} 4 layout='row' 5/>
Fork and create a pull request
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 8/17 approved changesets -- score normalized to 4
Reason
0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More