{"id":15693986,"url":"https://github.com/jossmac/react-prop-toggle","last_synced_at":"2025-05-08T05:57:30.409Z","repository":{"id":32010341,"uuid":"131372241","full_name":"jossmac/react-prop-toggle","owner":"jossmac","description":"🕹 Influence nodes outside your app's render tree","archived":false,"fork":false,"pushed_at":"2022-01-11T02:09:42.000Z","size":162,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T05:57:25.359Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jossmac.github.io/react-prop-toggle","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-28T04:20:12.000Z","updated_at":"2023-03-17T14:39:56.000Z","dependencies_parsed_at":"2022-08-07T17:01:25.897Z","dependency_job_id":null,"html_url":"https://github.com/jossmac/react-prop-toggle","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-prop-toggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-prop-toggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-prop-toggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-prop-toggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jossmac","download_url":"https://codeload.github.com/jossmac/react-prop-toggle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253009891,"owners_count":21839714,"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":[],"created_at":"2024-10-03T18:50:57.765Z","updated_at":"2025-05-08T05:57:30.389Z","avatar_url":"https://github.com/jossmac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Prop Toggle\n\nA safe, declarative way to influence the styles and attributes of nodes outside\nyour app's tree.\n\nBy storing the initial values of the target node when mounting\n`react-prop-toggle` is able to safely return styles and attributes when\nunmounted.\n\n```jsx\nimport PropToggle, { SimpleToggle } from 'react-prop-toggle';\n\n// Use PropToggle with `isActive` prop\n\u003cPropToggle\n  isActive={this.state.someCondition}\n  attributes={{ 'data-variant': 'true' }}\n  styles={{ background: 'red' }}\n/\u003e\n\n// Or use SimpleToggle for a component that's already conditionally rendered\nclass Modal extends Component {\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cSimpleToggle\n          attributes={{ 'data-variant': 'true' }}\n          styles={{ background: 'red' }}\n        /\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossmac%2Freact-prop-toggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjossmac%2Freact-prop-toggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossmac%2Freact-prop-toggle/lists"}