Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-radios

jossmac3.2kMIT1.1.0

Proper handling of HTML radios in react

radio, radio-group, radios

readme

React Radios

Brings radio group behavior into line with other input types in React like the select tag.

<RadioGroup value={this.state.fruit} onChange={this.handleChange}>
  <Radio value="apple" /> Apple
  <Radio value="orange" /> Orange
  <Radio value="banana" /> Banana
</RadioGroup>

If you'd like to use the same single-value pattern for checkboxes, there's components for that too:

<CheckboxGroup value={this.state.numbers} onChange={this.handleChange}>
  <Checkbox value={1} /> One
  <Checkbox value={2} /> Two
  <Checkbox value={3} /> Three
</CheckboxGroup>