{"id":13422132,"url":"https://github.com/fritx/react-drag-sizing","last_synced_at":"2026-03-05T09:32:59.481Z","repository":{"id":57333172,"uuid":"249742396","full_name":"fritx/react-drag-sizing","owner":"fritx","description":"\"Drag to resize\" (sizing) as React Component.","archived":false,"fork":false,"pushed_at":"2022-09-04T13:44:49.000Z","size":790,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-17T20:49:51.075Z","etag":null,"topics":["dnd","drag-and-drop","hooks","layout","react","resize","sizing"],"latest_commit_sha":null,"homepage":"https://fritx.github.io/react-drag-sizing/","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/fritx.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":"2020-03-24T15:17:22.000Z","updated_at":"2024-04-27T07:49:11.000Z","dependencies_parsed_at":"2022-08-24T18:40:54.499Z","dependency_job_id":null,"html_url":"https://github.com/fritx/react-drag-sizing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fritx/react-drag-sizing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-drag-sizing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-drag-sizing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-drag-sizing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-drag-sizing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fritx","download_url":"https://codeload.github.com/fritx/react-drag-sizing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-drag-sizing/sbom","scorecard":{"id":411724,"data":{"date":"2025-08-11","repo":{"name":"github.com/fritx/react-drag-sizing","commit":"152732df9f9c945fbad017250cd054965f7d2da2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/9 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":"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":"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":"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":"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":"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-18T22:52:52.585Z","repository_id":57333172,"created_at":"2025-08-18T22:52:52.585Z","updated_at":"2025-08-18T22:52:52.585Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30117715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T08:19:04.902Z","status":"ssl_error","status_checked_at":"2026-03-05T08:17:37.148Z","response_time":93,"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":["dnd","drag-and-drop","hooks","layout","react","resize","sizing"],"created_at":"2024-07-30T23:00:37.674Z","updated_at":"2026-03-05T09:32:59.438Z","avatar_url":"https://github.com/fritx.png","language":"TypeScript","funding_links":[],"categories":["UI Components"],"sub_categories":["Form Components"],"readme":"# react-drag-sizing\n\n\u003ca href=\"https://www.npmjs.com/package/react-drag-sizing\"\u003e\u003cimg height=\"20\" src=\"https://img.shields.io/npm/dm/react-drag-sizing.svg\"\u003e\u003c/a\u003e\n\n\u003cimg width=\"359\" src=\"https://raw.githubusercontent.com/fritx/react-drag-sizing/master/demo.gif\"\u003e\n\n- [x] \"Drag to resize\" (sizing) as React Component\n- [x] Rewritten with TS \u0026 React-hooks\n- [ ] Polyfill workaround with React \u003c 16.8\n- [x] Support both mouse \u0026 touch\n- [x] Rollup bundle for both esm \u0026 umd\n- [x] Default handlerWidth=16, handlerOffset=-w/2, handlerZIndex=10\n- [x] Legacy branch: https://github.com/fritx/react-drag-sizing/tree/legacy\n- [x] Live Demo: https://fritx.github.io/react-drag-sizing\n\n```sh\nnpm i -S react-drag-sizing\n```\n\n```tsx\nimport DragSizing from 'react-drag-sizing'\n\n\u003cdiv className=\"chat-top\"\u003e\u003c/div\u003e\n\u003cdiv className=\"chat-body\"\u003e\n  \u003cdiv className=\"chat-left\"\u003e\n    \u003cMessageList /\u003e\n    \u003cDragSizing border=\"top\"\u003e\n      \u003cEditor /\u003e\n    \u003c/DragSizing\u003e\n  \u003c/div\u003e\n  \u003cdiv className=\"chat-right\"\u003e\n    \u003cDragSizing border=\"left\"\u003e\n      \u003cMemberList /\u003e\n    \u003c/DragSizing\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n#### Props\n\n```tsx\nexport type MEvent = MouseEvent | TouchEvent;\nexport type RdsMEvent =\n  | MouseEvent\n  | (TouchEvent \u0026 {\n      clientX: number;\n      clientY: number;\n    });\n\nexport interface DragSizingProps {\n  border: 'top' | 'bottom' | 'left' | 'right';\n  onStart?: (e: RdsMEvent) =\u003e void;\n  onEnd?: (e: RdsMEvent) =\u003e void;\n  onUpdate?: (e: RdsMEvent) =\u003e void;\n  id?: string;\n  className?: string;\n  style?: React.CSSProperties;\n  handlerClassName?: string;\n  handlerStyle?: React.CSSProperties;\n  handlerWidth?: number;\n  handlerOffset?: number;\n  handlerZIndex?: number;\n}\n```\n\n**hooking event listeners**\n\n```tsx\nhandleEditorSizingStart = () =\u003e {\n  // const nearBottom = scrollTop \u003e ...\n  setShouldStickToBottom(nearBottom);\n};\nhandleEditorSizingEnd = () =\u003e {\n  if (shouldStickToBottom) {\n    scrollToBottom();\n  }\n};\n\n\u003cDragSizing\n  border=\"top\"\n  onStart={handleEditorSizingStart}\n  onEnd={handleEditorSizingEnd}\n\u003e\n  \u003cEditor /\u003e\n\u003c/DragSizing\u003e;\n```\n\n**for umd / \\\u003cscript\u003e usage**\n\n```html\n\u003cscript src=\"https://unpkg.com/react\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/react-dom\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/react-drag-sizing\"\u003e\u003c/script\u003e\n\u003cscript src=\"myapp.js\"\u003e\u003c/script\u003e\n```\n\n```js\n// myapp.js\nlet React = window.React;\nlet ReactDOM = window.ReactDOM;\nlet { DragSizing } = window.ReactDragSizing;\n\nReactDOM.render(\n  \u003cdiv style={{ display: 'flex' }}\u003e\n    \u003csidebar style={{ flex: 1 }}\u003eLeft bar\u003c/sidebar\u003e\n    \u003cDragSizing\n      border=\"left\"\n      style={{ minWidth: '15%', maxWidth: '85%', width: '50%' }}\n      handlerStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.2)' }}\n    \u003e\n      \u003cmain\u003eMain content\u003c/main\u003e\n    \u003c/DragSizing\u003e\n  \u003c/div\u003e,\n  mountNode\n);\n```\n\n**for react \u003c 16.8 we need hooks polyfill workaround**\n\n```tsx\n// todo\n```\n\n---\n\nThis project was bootstrapped with [create-react-library](https://github.com/transitive-bullshit/create-react-library) \u0026 [react-ts-demo](https://github.com/fritx/react-ts-demo).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritx%2Freact-drag-sizing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffritx%2Freact-drag-sizing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritx%2Freact-drag-sizing/lists"}