{"id":23103581,"url":"https://github.com/pjb0811/react-dnd-component","last_synced_at":"2026-04-27T16:31:47.730Z","repository":{"id":65473205,"uuid":"148437674","full_name":"pjb0811/react-dnd-component","owner":"pjb0811","description":"components using react \u0026 react-dnd","archived":false,"fork":false,"pushed_at":"2019-02-28T09:54:50.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T16:41:30.462Z","etag":null,"topics":["react","react-dnd"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pjb0811.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-12T07:10:13.000Z","updated_at":"2019-02-28T09:54:51.000Z","dependencies_parsed_at":"2023-01-25T12:15:59.289Z","dependency_job_id":null,"html_url":"https://github.com/pjb0811/react-dnd-component","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pjb0811/react-dnd-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjb0811%2Freact-dnd-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjb0811%2Freact-dnd-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjb0811%2Freact-dnd-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjb0811%2Freact-dnd-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pjb0811","download_url":"https://codeload.github.com/pjb0811/react-dnd-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjb0811%2Freact-dnd-component/sbom","scorecard":{"id":736135,"data":{"date":"2025-08-11","repo":{"name":"github.com/pjb0811/react-dnd-component","commit":"1e27ba7fba57f281a68fd345f4c1b14e9f6ac47c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"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":"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":"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":"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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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-22T15:55:06.864Z","repository_id":65473205,"created_at":"2025-08-22T15:55:06.864Z","updated_at":"2025-08-22T15:55:06.864Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32345802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["react","react-dnd"],"created_at":"2024-12-17T00:21:37.313Z","updated_at":"2026-04-27T16:31:47.712Z","avatar_url":"https://github.com/pjb0811.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-dnd-component\n\n\u003e components using react \u0026 react-dnd\n\n[![NPM](https://img.shields.io/npm/v/react-dnd-component.svg)](https://www.npmjs.com/package/react-dnd-component) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Install\n\n```bash\nnpm install --save react-dnd-component\n```\n\n## Usage\n\n### List\n\n[demo](https://codesandbox.io/s/ll724prxrq)\n\n```tsx\nimport React, { Component } from 'react';\nimport { List, DragDropContext, HTML5Backend } from 'react-dnd-component';\n\nclass App extends Component {\n  render() {\n    const style = {\n      display: 'flex',\n      justifyContent: 'space-around',\n      paddingTop: '20px',\n      flexWrap: 'wrap'\n    };\n\n    const itemStyle = {\n      width: 200,\n      height: 200,\n      display: 'inline-flex',\n      justifyContent: 'center',\n      alignItems: 'center',\n      color: 'white',\n      fontSize: 20\n    };\n\n    const item = length =\u003e {\n      return Array.from({ length }, (x, i) =\u003e {\n        return (\n          \u003cdiv key={i} style={{ ...itemStyle, background: 'green' }}\u003e\n            {i}\n          \u003c/div\u003e\n        );\n      });\n    };\n\n    return (\n      \u003cdiv style={{ ...style }}\u003e\n        \u003cList\n          name={'test1'}\n          id={1}\n          width={200}\n          height={200}\n          rows={3}\n          style={{\n            background: 'yellow',\n            margin: 10\n          }}\n          activeStyle={{\n            background: 'red'\n          }}\n          onChange={state =\u003e {\n            console.log(state);\n          }}\n        \u003e\n          {item(5)}\n        \u003c/List\u003e\n\n        \u003cList\n          name={'test1'}\n          id={2}\n          width={200}\n          height={200}\n          rows={3}\n          style={{\n            background: 'orange',\n            margin: 10\n          }}\n          activeStyle={{\n            background: 'blue'\n          }}\n        \u003e\n          {item(5)}\n        \u003c/List\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nexport default DragDropContext(HTML5Backend)(App);\n```\n\n### Native Files\n\n[demo](https://codesandbox.io/s/6j6x9jp183)\n\n```tsx\nimport React, { Component } from 'react';\nimport {\n  NativeFiles,\n  DragDropContext,\n  HTML5Backend\n} from 'react-dnd-component';\n\nclass App extends Component {\n  render() {\n    return (\n      \u003cNativeFiles\u003e\n        {({ canDrop, isOver, files, removeFiles }) =\u003e {\n          return (\n            \u003cFileList\n              canDrop={canDrop}\n              isOver={isOver}\n              files={files}\n              removeFiles={removeFiles}\n            /\u003e\n          );\n        }}\n      \u003c/NativeFiles\u003e\n    );\n  }\n}\n\nconst style = {\n  width: 200,\n  height: 200,\n  border: '1px solid'\n};\n\nclass FileList extends React.Component {\n  render() {\n    const { files, canDrop, isOver, removeFiles } = this.props;\n    const isActive = canDrop \u0026\u0026 isOver;\n\n    if (files.length === 0) {\n      return (\n        \u003cdiv style={style}\u003e\n          \u003cdiv\u003e{isActive ? 'Release to drop' : 'Drag file here'}\u003c/div\u003e\n        \u003c/div\u003e\n      );\n    }\n\n    return (\n      \u003cdiv style={style}\u003e\n        {this.list(files)}\n        \u003cbutton onClick={removeFiles}\u003eremove files\u003c/button\u003e\n      \u003c/div\u003e\n    );\n  }\n\n  list = files =\u003e {\n    return files.map(file =\u003e \u003cdiv key={file.name}\u003ename: {file.name}\u003c/div\u003e);\n  };\n}\n\nexport default DragDropContext(HTML5Backend)(App);\n```\n\n## License\n\nMIT © [pjb0811](https://github.com/pjb0811)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjb0811%2Freact-dnd-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpjb0811%2Freact-dnd-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjb0811%2Freact-dnd-component/lists"}