{"id":15643007,"url":"https://github.com/jossmac/react-radios","last_synced_at":"2025-04-14T19:05:36.417Z","repository":{"id":57343005,"uuid":"130329288","full_name":"jossmac/react-radios","owner":"jossmac","description":"🔘 Proper handling of HTML radios in react","archived":false,"fork":false,"pushed_at":"2018-10-12T01:53:48.000Z","size":150,"stargazers_count":60,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T07:22:56.762Z","etag":null,"topics":["radio-buttons","react"],"latest_commit_sha":null,"homepage":"https://jossmac.github.io/react-radios","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jossmac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-20T07:56:45.000Z","updated_at":"2023-06-28T15:30:38.000Z","dependencies_parsed_at":"2022-09-16T07:50:14.362Z","dependency_job_id":null,"html_url":"https://github.com/jossmac/react-radios","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-radios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-radios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-radios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-radios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jossmac","download_url":"https://codeload.github.com/jossmac/react-radios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246285645,"owners_count":20752947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["radio-buttons","react"],"created_at":"2024-10-03T11:58:36.287Z","updated_at":"2025-03-30T06:30:45.921Z","avatar_url":"https://github.com/jossmac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Radios\n\nBrings radio group behavior into line with other input types in React like the [select tag](https://reactjs.org/docs/forms.html#the-select-tag).\n\n[https://jossmac.github.io/react-radios](https://jossmac.github.io/react-radios)\n\n### Install\n\n```bash\nyarn add react-radios\n```\n\n### Use\n\n```js\nimport { Radio, RadioGroup } from 'react-radios';\n\n\u003cRadioGroup value={this.state.fruit} onChange={this.handleChange}\u003e\n  \u003cRadio value=\"apple\" /\u003e Apple\n  \u003cRadio value=\"orange\" /\u003e Orange\n  \u003cRadio value=\"banana\" /\u003e Banana\n\u003c/RadioGroup\u003e\n```\n\nIf you'd like to use the same single-value pattern for checkboxes,\nthere's components for that too:\n\n```js\nimport { Checkbox, CheckboxGroup } from 'react-radios';\n\n\u003cCheckboxGroup value={this.state.numbers} onChange={this.handleChange}\u003e\n  \u003cCheckbox value={1} /\u003e One\n  \u003cCheckbox value={2} /\u003e Two\n  \u003cCheckbox value={3} /\u003e Three\n\u003c/CheckboxGroup\u003e\n```\n\n### Props\n\n#### RadioGroup / CheckboxGroup\n\n| Property        | Description                      |\n| --------------- | -------------------------------- |\n| children `Node` | Required. Radios or Checkboxes. |\n| component `$ReactComponent` | Default: `$ReactFragment`. Replace the underlying component. |\n| onChange `value =\u003e mixed` | Required. Function to handle the onChange event. |\n| name `string` | Name to be passed onto each child. |\n| value `string \\| number` | The value of the group. |\n\n#### Radio / Checkbox\n\n| Property        | Description                      |\n| --------------- | -------------------------------- |\n| component `$ReactComponent` | Default: `'input'`. Replace the underlying component. |\n| value `string \\| number` | The value of the control. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossmac%2Freact-radios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjossmac%2Freact-radios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossmac%2Freact-radios/lists"}