{"id":15862017,"url":"https://github.com/afeiship/react-visible","last_synced_at":"2026-05-15T23:12:04.617Z","repository":{"id":57123005,"uuid":"87532106","full_name":"afeiship/react-visible","owner":"afeiship","description":"React component for visible element.","archived":false,"fork":false,"pushed_at":"2021-02-15T17:38:29.000Z","size":1118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T09:00:06.037Z","etag":null,"topics":["alert","confirm","dialog","modal","popup","react","visible"],"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":"2017-04-07T09:58:53.000Z","updated_at":"2021-02-15T17:38:31.000Z","dependencies_parsed_at":"2022-08-25T17:11:18.079Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/react-visible","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/afeiship/react-visible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-visible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-visible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-visible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-visible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/react-visible/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-visible/sbom","scorecard":{"id":169601,"data":{"date":"2025-08-11","repo":{"name":"github.com/afeiship/react-visible","commit":"a27cb7dcf7f1af4463b292111023a767c21ad555"},"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":"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":"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":"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":"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":"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":"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":"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":"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":"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:52.993Z","repository_id":57123005,"created_at":"2025-08-16T16:02:52.993Z","updated_at":"2025-08-16T16:02:52.993Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33082963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["alert","confirm","dialog","modal","popup","react","visible"],"created_at":"2024-10-05T22:23:16.621Z","updated_at":"2026-05-15T23:12:04.598Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-visible\n\u003e React component for visible element.\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-visible\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    | false   | If element destroyed when visible to false.                                                           |\n| rootable    | bool   | false    | false   | If attach the visible element to document root or a container.                                        |\n| onChange    | func   | false    | noop    | The handler when visible changed, default is `noop` function, present or dismiss action will trigger. |\n| onPresent   | func   | false    | noop    | The handler when present.                                                                             |\n| onDismiss   | func   | false    | noop    | The handler when dismiss.                                                                             |\n\n\n## usage\n1. import css\n  ```scss\n  @import \"~@jswork/react-visible/dist/style.css\";\n\n  // or use sass\n  @import \"~@jswork/react-visible/dist/style.scss\";\n\n  // customize your styles:\n  $react-visible-options: ()\n  ```\n2. import js\n  ```js\n  import ReactDemokit from '@jswork/react-demokit';\n  import React from 'react';\n  import ReactDOM from 'react-dom';\n  import ReactVisible, { Controller } from '@jswork/react-visible';\n  import './assets/style.scss';\n\n  class Backdrop extends ReactVisible {\n    get visibleElementView() {\n      const {\n        className,\n        destroyable,\n        rootable,\n        value,\n        onPresent,\n        onDismiss,\n        ...props\n      } = this.props;\n      const { hidden } = this.state;\n\n      return (\n        \u003cdiv\n          data-position=\"absolute\"\n          data-component={'backdrop'}\n          hidden={hidden}\n          data-visible={this.state.value}\n          hidden={hidden}\n          className={`wsui-backdrop ${className}`}\n          onAnimationEnd={this.handleAnimationEnd}\n          {...props}\n        /\u003e\n      );\n    }\n  }\n\n  class App extends React.Component {\n    state = {\n      value: false\n    };\n\n    componentDidMount() {\n      // console.log(Controller.createInstance);\n      Controller.createInstance(Backdrop, { destroyable: true }, true);\n    }\n\n    render() {\n      return (\n        \u003cReactDemokit\n          className=\"p-3 app-container\"\n          url=\"https://github.com/afeiship/react-visible\"\u003e\n          \u003cbutton\n            className=\"button\"\n            onClick={(e) =\u003e {\n              this.el.present();\n            }}\u003e\n            Button Open\n          \u003c/button\u003e\n\n          \u003cbutton\n            className=\"button\"\n            onClick={(e) =\u003e {\n              this.el.dismiss();\n            }}\u003e\n            Button Close\n          \u003c/button\u003e\n          \u003cBackdrop ref={(el) =\u003e (this.el = el)} /\u003e\n\n          \u003cBackdrop\n            value={this.state.value}\n            destroyable\n            onChange={(e) =\u003e {\n              console.log('e.target.value:', e.target.value);\n              this.setState({ value: e.target.value });\n            }}\n          /\u003e\n\n          \u003cbutton\n            className=\"button\"\n            onClick={(e) =\u003e {\n              this.setState({ value: !this.state.value });\n            }}\u003e\n            Toggle\n          \u003c/button\u003e\n\n          \u003cbutton\n            className=\"button\"\n            onClick={(e) =\u003e {\n              Backdrop.toggle((e) =\u003e {\n                console.log('after present/dismiss!', e);\n              });\n            }}\u003e\n            Singleton backdrop Toggle\n          \u003c/button\u003e\n        \u003c/ReactDemokit\u003e\n      );\n    }\n  }\n\n  ReactDOM.render(\u003cApp /\u003e, document.getElementById('app'));\n\n  ```\n\n## documentation\n- https://afeiship.github.io/react-visible/\n\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/react-visible/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/react-visible\n[version-url]: https://npmjs.org/package/@jswork/react-visible\n\n[license-image]: https://img.shields.io/npm/l/@jswork/react-visible\n[license-url]: https://github.com/afeiship/react-visible/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-visible\n[size-url]: https://github.com/afeiship/react-visible/blob/master/dist/react-visible.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/react-visible\n[download-url]: https://www.npmjs.com/package/@jswork/react-visible\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Freact-visible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Freact-visible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Freact-visible/lists"}