{"id":14990663,"url":"https://github.com/agutoli/react-styled-tree-checkbox","last_synced_at":"2026-01-04T16:48:42.851Z","repository":{"id":57345887,"uuid":"162837666","full_name":"agutoli/react-styled-tree-checkbox","owner":"agutoli","description":"Modular/Simple Tree Checkbox component - http://agutoli.github.io/react-styled-tree-checkbox/","archived":false,"fork":false,"pushed_at":"2019-02-25T22:57:02.000Z","size":125,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T19:22:22.465Z","etag":null,"topics":["checkbox","css","form","html","javascript","react","reactjs","styled-components","tree"],"latest_commit_sha":null,"homepage":"","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/agutoli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-12-22T19:30:59.000Z","updated_at":"2019-02-25T22:56:51.000Z","dependencies_parsed_at":"2022-09-18T09:21:55.102Z","dependency_job_id":null,"html_url":"https://github.com/agutoli/react-styled-tree-checkbox","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agutoli%2Freact-styled-tree-checkbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agutoli%2Freact-styled-tree-checkbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agutoli%2Freact-styled-tree-checkbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agutoli%2Freact-styled-tree-checkbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agutoli","download_url":"https://codeload.github.com/agutoli/react-styled-tree-checkbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244888535,"owners_count":20526823,"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":["checkbox","css","form","html","javascript","react","reactjs","styled-components","tree"],"created_at":"2024-09-24T14:20:33.562Z","updated_at":"2026-01-04T16:48:42.820Z","avatar_url":"https://github.com/agutoli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"react-styled-tree-checkbox\n============\n\nUp to date with react/react-dom `16.7.0` and styled-components `4.1.3`\n\n### ATTENTION: Work in Progress (sorry about that!)\n\n## Installation\n\n`npm install react-styled-tree-checkbox --save`\n\n## Demo\n\n[http://agutoli.github.io/react-styled-tree-checkbox/](http://agutoli.github.io/react-styled-tree-checkbox/)\n\n#### Screenshot Example\n![](https://i.ibb.co/hyMgSJ4/Screen-Shot-2018-12-22-at-19-17-03.png)\n\n\n#### CSS Vanilla Themes\n![](https://i.ibb.co/K9cVmhW/Screen-Shot-2018-12-24-at-22-12-48.png)\n\n```css\n/** Example css **/\n.red-theme {\n  --styled-input-checkbox-checkmark__border-color--after: red;\n  --styled-input-checkbox-checkmark__border-color--checked-hover: red;\n}\n\n.blue-theme {\n  --styled-input-checkbox-checkmark__border-color--after: blue;\n  --styled-input-checkbox-checkmark__border-color--checked-hover: blue;\n}\n\n.green-theme {\n  --styled-input-checkbox-checkmark__border-color--after: green;\n  --styled-input-checkbox-checkmark__border-color--checked-hover: green;\n}\n```\n\n```html\n\u003c!-- JSX example --\u003e\n\u003cdiv\u003e\n  \u003cTreeCheckbox nodes={nodes} showToggleText={true} className=\"blue-theme\" /\u003e\n  \u003cTreeCheckbox nodes={nodes} showToggleText={true} className=\"green-theme\" /\u003e\n  \u003cTreeCheckbox nodes={nodes} showToggleText={true} className=\"red-theme\" /\u003e\n\u003c/div\u003e\n```\n\n## Example Usage\n```js\nimport React from 'react'\nimport TreeCheckbox from 'react-styled-tree-checkbox'\n\nconst nodes = [\n  {\n    \"value\": 11,\n    \"label\": \"Facebook\",\n    \"icon\": \"\u003cYourIcon/\u003e\",\n    \"children\": [\n      {\n        \"value\": 111,\n        \"label\": \"Child node 1.1\"\n      },\n      ...\n    ]\n  },\n  ...\n]\n\nconst YourReactApp = () =\u003e (\n  \u003cTreeCheckbox nodes={nodes} showToggleText={true} /\u003e\n)\n```\n## Available CSS variables\n\u003cpre\u003e\n--styled-\u003cb\u003echild-node-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-family\"\u003efont-family\u003c/a\u003e: \"Open Sans\", Helvetica, Arial, sans-serif;\n--styled-\u003cb\u003echild-node-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\"\u003efont-size\u003c/a\u003e: 14px;\n--styled-\u003cb\u003echild-node-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\"\u003eline-height\u003c/a\u003e: 12px;\n--styled-\u003cb\u003echild-node-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/user-select\"\u003euser-select\u003c/a\u003e: none;\n\n--styled-\u003cb\u003echild-node-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\"\u003emargin-bottom\u003c/a\u003e: 5px;\n--styled-\u003cb\u003echild-node-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\"\u003emargin-left\u003c/a\u003e: 4px;\n\n--styled-\u003cb\u003echildren-node-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\"\u003emargin-bottom\u003c/a\u003e: 10px;\n--styled-\u003cb\u003echildren-node-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\"\u003emargin-left\u003c/a\u003e: 20px;\n\n--styled-\u003cb\u003ecollapse-expand-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/color\"\u003ecolor\u003c/a\u003e: #3C5A96;\n--styled-\u003cb\u003ecollapse-expand-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-family\"\u003efont-family\u003c/a\u003e: \"Open Sans\", Helvetica, Arial, sans-serif;\n--styled-\u003cb\u003ecollapse-expand-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\"\u003efont-size\u003c/a\u003e: 12px;\n--styled-\u003cb\u003ecollapse-expand-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\"\u003emargin-left\u003c/a\u003e: 5px;\n--styled-\u003cb\u003ecollapse-expand-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/width\"\u003ewidth\u003c/a\u003e: 50px;\n\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/background-color\"\u003ebackground-color\u003c/a\u003e: white;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/background-color\"\u003ebackground-color\u003c/a\u003e--\u003cb\u003echecked\u003c/b\u003e: white;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/background-color\"\u003ebackground-color\u003c/a\u003e--\u003cb\u003ehover\u003c/b\u003e: white;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-color\"\u003eborder-color\u003c/a\u003e: #DFE3EE;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-color\"\u003eborder-color\u003c/a\u003e--\u003cb\u003eafter\u003c/b\u003e: #3e8ab4;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-color\"\u003eborder-color\u003c/a\u003e--\u003cb\u003echecked\u003c/b\u003e: #CBCBCB;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-color\"\u003eborder-color\u003c/a\u003e--\u003cb\u003echecked-hover\u003c/b\u003e: #3e8ab4;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-color\"\u003eborder-color\u003c/a\u003e--\u003cb\u003ehover\u003c/b\u003e: #CBCBCB;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\"\u003eborder-radius\u003c/a\u003e: 0;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\"\u003eborder-style\u003c/a\u003e: solid;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\"\u003eborder-style\u003c/a\u003e--\u003cb\u003eafter\u003c/b\u003e: solid;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-width\"\u003eborder-width\u003c/a\u003e: 1px;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/border-width\"\u003eborder-width\u003c/a\u003e--\u003cb\u003eafter\u003c/b\u003e: 0 2px 2px 0;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/height\"\u003eheight\u003c/a\u003e: 14px;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/height\"\u003eheight\u003c/a\u003e--\u003cb\u003eafter\u003c/b\u003e: 6px;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/left\"\u003eleft\u003c/a\u003e: 0;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/left\"\u003eleft\u003c/a\u003e--\u003cb\u003eafter\u003c/b\u003e: 5px;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/top\"\u003etop\u003c/a\u003e: 0;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/top\"\u003etop\u003c/a\u003e--\u003cb\u003eafter\u003c/b\u003e: 2px;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/width\"\u003ewidth\u003c/a\u003e: 14px;\n--styled-\u003cb\u003einput-checkbox-checkmark\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/width\"\u003ewidth\u003c/a\u003e--\u003cb\u003eafter\u003c/b\u003e: 3px;\n\n--styled-\u003cb\u003einput-checkbox-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\"\u003efont-size\u003c/a\u003e: 22px;\n--styled-\u003cb\u003einput-checkbox-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\"\u003emargin-bottom\u003c/a\u003e: 16px;\n--styled-\u003cb\u003einput-checkbox-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\"\u003epadding-left\u003c/a\u003e: 24px;\n--styled-\u003cb\u003einput-checkbox-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/user-select\"\u003euser-select\u003c/a\u003e: none;\n\n--styled-\u003cb\u003eroot-node-label-children-len\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/color\"\u003ecolor\u003c/a\u003e: #ccc;\n--styled-\u003cb\u003eroot-node-label-children-len\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\"\u003efont-size\u003c/a\u003e: 12px;\n--styled-\u003cb\u003eroot-node-label-children-len\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\"\u003efont-weight\u003c/a\u003e: normal;\n\n--styled-\u003cb\u003eroot-node-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-family\"\u003efont-family\u003c/a\u003e: Tahoma, Helvetica, Arial, sans-serif;\n--styled-\u003cb\u003eroot-node-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\"\u003efont-size\u003c/a\u003e: 14px;\n--styled-\u003cb\u003eroot-node-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\"\u003efont-weight\u003c/a\u003e: normal;\n--styled-\u003cb\u003eroot-node-label\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\"\u003eline-height\u003c/a\u003e: 16px;\n\n--styled-\u003cb\u003eroot-node-wrapper-svg\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/height\"\u003eheight\u003c/a\u003e: 18px;\n--styled-\u003cb\u003eroot-node-wrapper-svg\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/width\"\u003ewidth\u003c/a\u003e: 18px;\n\n--styled-\u003cb\u003eroot-node-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\"\u003emargin-bottom\u003c/a\u003e: 12px;\n\n--styled-\u003cb\u003etree-checkbox-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/color\"\u003ecolor\u003c/a\u003e: #999FAC;\n--styled-\u003cb\u003etree-checkbox-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\"\u003emargin-bottom\u003c/a\u003e: 24px;\n--styled-\u003cb\u003etree-checkbox-wrapper\u003c/b\u003e__\u003ca href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\"\u003emargin-left\u003c/a\u003e: 22px;\n\u003c/pre\u003e\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2018 Bruno Agutoli\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagutoli%2Freact-styled-tree-checkbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagutoli%2Freact-styled-tree-checkbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagutoli%2Freact-styled-tree-checkbox/lists"}