{"id":15862062,"url":"https://github.com/afeiship/react-modal","last_synced_at":"2026-05-07T11:33:42.555Z","repository":{"id":57122988,"uuid":"76456043","full_name":"afeiship/react-modal","owner":"afeiship","description":"Modal components for react.","archived":false,"fork":false,"pushed_at":"2021-03-05T06:59:37.000Z","size":3051,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T15:58:11.331Z","etag":null,"topics":["component","components","dialog","modal","pc","popup","react","ui","web"],"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/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-14T12:04:48.000Z","updated_at":"2021-03-05T06:59:39.000Z","dependencies_parsed_at":"2022-08-25T17:11:17.368Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/react-modal","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/afeiship/react-modal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-modal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-modal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-modal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-modal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/react-modal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-modal/sbom","scorecard":{"id":169574,"data":{"date":"2025-08-11","repo":{"name":"github.com/afeiship/react-modal","commit":"36df8b07887788b7d4bae55841470aebadc72428"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T16:02:32.438Z","repository_id":57122988,"created_at":"2025-08-16T16:02:32.438Z","updated_at":"2025-08-16T16:02:32.438Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32735201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["component","components","dialog","modal","pc","popup","react","ui","web"],"created_at":"2024-10-05T22:24:16.715Z","updated_at":"2026-05-07T11:33:42.535Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-modal\n\u003e Modal components for react.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```shell\nnpm install -S @jswork/react-modal\n```\n\n## properties\n| Name        | Type   | Required | Default | Description                                 |\n| ----------- | ------ | -------- | ------- | ------------------------------------------- |\n| className   | string | false    | -       | The extended className for component.       |\n| value       | bool   | false    | -       | Abstract visible value.                     |\n| destroyable | bool   | false    | true    | If element destroyed when visible to false. |\n| onChange    | func   | false    | noop    | The change handler.                         |\n| backdrop    | union  | false    | -       | Backdrop props or not display backdrop.     |\n\n\n## usage\n1. import css\n  ```scss\n  @import \"~@jswork/react-modal/dist/style.scss\";\n\n  // customize your styles:\n  $react-modal-options: ()\n  ```\n2. import js\n  ```js\n  import ReactModal from '@jswork/react-modal';\n  import ReactDOM from 'react-dom';\n  import React from 'react';\n  import './assets/style.scss';\n\n  class App extends React.Component {\n    state = {\n      value1: false,\n      value2: false\n    };\n\n    toggleModal = (inKey) =\u003e {\n      this.setState({ [inKey]: !this.state[inKey] });\n    };\n\n    render() {\n      return (\n        \u003cdiv className=\"app-container\"\u003e\n          \u003cReactModal\n            value={this.state.value1}\n            backdrop={{\n              onClick: this.toggleModal.bind(this, 'value1')\n            }}\u003e\n            \u003cdiv className=\"bd\"\u003e\n              \u003ch1\u003e道\u003c/h1\u003e\n              \u003cp\u003e\n                道可道，非常道；名可名，非常名。 无名，天地之始，有名，万物之母。\n                故常无欲，以观其妙，常有欲，以观其徼。\n                此两者，同出而异名，同谓之玄，玄之又玄，众妙之门。\n              \u003c/p\u003e\n              \u003cimg\n                src=\"https://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg\"\n                width=\"60%\"\n              /\u003e\n              \u003cbutton\n                className=\"button\"\n                onClick={this.toggleModal.bind(this, 'value1')}\u003e\n                学到啦！\n              \u003c/button\u003e\n            \u003c/div\u003e\n          \u003c/ReactModal\u003e\n\n          \u003cReactModal value={this.state.value2}\u003e\n            \u003cdiv className=\"bd\"\u003e\n              \u003ch1\u003e道可道，非常道 - no backdrop\u003c/h1\u003e\n              \u003cp\u003e\n                天下皆知美之为美，斯恶已，皆知善之为善，斯不善已。\n                故有无相生，难易相成，长短相形，高下相倾，音声相和，前后相随。\n                是以圣人处无为之事，行不言之教，万物作焉而不辞，生而不有，为而不恃，功成而弗居。\n                夫惟弗居，是以不去。\n              \u003c/p\u003e\n              \u003cimg src=\"https://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg\" /\u003e\n              \u003cbutton\n                className=\"button\"\n                onClick={this.toggleModal.bind(this, 'value2')}\u003e\n                可以关掉我\n              \u003c/button\u003e\n            \u003c/div\u003e\n          \u003c/ReactModal\u003e\n\n          \u003cbutton\n            className=\"button\"\n            onClick={(e) =\u003e {\n              this.setState({ value1: !this.state.value1 });\n            }}\u003e\n            Toggle1\n          \u003c/button\u003e\n\n          \u003cbutton\n            className=\"button\"\n            onClick={(e) =\u003e {\n              this.setState({ value2: !this.state.value2 });\n            }}\u003e\n            Toggle2\n          \u003c/button\u003e\n        \u003c/div\u003e\n      );\n    }\n  }\n\n  ReactDOM.render(\u003cApp /\u003e, document.getElementById('app'));\n  ```\n\n## documentation\n- https://afeiship.github.io/react-modal/\n\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/react-modal/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/react-modal\n[version-url]: https://npmjs.org/package/@jswork/react-modal\n\n[license-image]: https://img.shields.io/npm/l/@jswork/react-modal\n[license-url]: https://github.com/afeiship/react-modal/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-modal\n[size-url]: https://github.com/afeiship/react-modal/blob/master/dist/react-modal.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/react-modal\n[download-url]: https://www.npmjs.com/package/@jswork/react-modal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Freact-modal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Freact-modal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Freact-modal/lists"}