{"id":13461973,"url":"https://github.com/malcodeman/react-button-group","last_synced_at":"2026-05-06T05:32:50.140Z","repository":{"id":39127833,"uuid":"263666087","full_name":"malcodeman/react-button-group","owner":"malcodeman","description":"A button group is a set of two or more button segments.","archived":false,"fork":false,"pushed_at":"2023-01-06T05:49:57.000Z","size":4839,"stargazers_count":0,"open_issues_count":23,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T04:47:58.994Z","etag":null,"topics":["button","button-group","react"],"latest_commit_sha":null,"homepage":"http://react-button-group-storybook.surge.sh/","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/malcodeman.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":"2020-05-13T15:14:52.000Z","updated_at":"2020-05-25T17:32:18.000Z","dependencies_parsed_at":"2023-02-05T11:31:51.173Z","dependency_job_id":null,"html_url":"https://github.com/malcodeman/react-button-group","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/malcodeman%2Freact-button-group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcodeman%2Freact-button-group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcodeman%2Freact-button-group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcodeman%2Freact-button-group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malcodeman","download_url":"https://codeload.github.com/malcodeman/react-button-group/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245320502,"owners_count":20596191,"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":["button","button-group","react"],"created_at":"2024-07-31T12:00:36.737Z","updated_at":"2026-05-06T05:32:50.087Z","avatar_url":"https://github.com/malcodeman.png","language":"JavaScript","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"# [react-button-group](http://react-button-group-storybook.surge.sh)\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/malcodeman/react-button-group/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/v/@malcodeman/react-button-group)](https://www.npmjs.com/package/@malcodeman/react-button-group)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\nA button group is a set of two or more button segments. Within the control, all segments are equal in width. A button group is often used to switch between views of some data.\n\n## Getting started\n\n```sh\nyarn add @malcodeman/react-button-group\n# or\nnpm install --save @malcodeman/react-button-group\n```\n\n```jsx\nimport React from \"react\";\nimport { ButtonGroup } from \"@malcodeman/react-button-group\";\n\nfunction App() {\n  const [selected, setSelected] = React.useState([0]);\n\n  return (\n    \u003cdiv\u003e\n      \u003cButtonGroup\n        selected={selected}\n        onClick={(event, index) =\u003e {\n          setSelected([index]);\n        }}\n      \u003e\n        \u003cStyledButton\u003eOne\u003c/StyledButton\u003e\n        \u003cStyledButton\u003eTwo\u003c/StyledButton\u003e\n        \u003cStyledButton\u003eThree\u003c/StyledButton\u003e\n      \u003c/ButtonGroup\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalcodeman%2Freact-button-group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalcodeman%2Freact-button-group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalcodeman%2Freact-button-group/lists"}