{"id":13406482,"url":"https://github.com/BetterTyped/react-zoom-pan-pinch","last_synced_at":"2025-03-14T11:30:27.340Z","repository":{"id":37333853,"uuid":"196846946","full_name":"BetterTyped/react-zoom-pan-pinch","owner":"BetterTyped","description":"🖼 React library to support easy zoom, pan, pinch on various html dom elements like \u003cimg\u003e and \u003cdiv\u003e","archived":false,"fork":false,"pushed_at":"2024-10-25T21:34:01.000Z","size":17002,"stargazers_count":1509,"open_issues_count":127,"forks_count":273,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-29T17:26:40.620Z","etag":null,"topics":["figma","gesture","html-manipulation","miro","pan","pinch","react","react-component","svg","zoom","zoomin","zoomout"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/BetterTyped.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"Contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"Code_of_Conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["prc5"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2019-07-14T14:34:27.000Z","updated_at":"2024-10-29T15:20:21.000Z","dependencies_parsed_at":"2023-09-07T01:59:45.431Z","dependency_job_id":"b2af1b25-9b19-48f4-871b-20cc1cc47a63","html_url":"https://github.com/BetterTyped/react-zoom-pan-pinch","commit_stats":{"total_commits":350,"total_committers":54,"mean_commits":6.481481481481482,"dds":0.5057142857142858,"last_synced_commit":"5cf057b077fc515eaaaaafb94fd6c6dfec415289"},"previous_names":["prc5/react-zoom-pan-pinch"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetterTyped%2Freact-zoom-pan-pinch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetterTyped%2Freact-zoom-pan-pinch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetterTyped%2Freact-zoom-pan-pinch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetterTyped%2Freact-zoom-pan-pinch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BetterTyped","download_url":"https://codeload.github.com/BetterTyped/react-zoom-pan-pinch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243569005,"owners_count":20312344,"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":["figma","gesture","html-manipulation","miro","pan","pinch","react","react-component","svg","zoom","zoomin","zoomout"],"created_at":"2024-07-30T19:02:31.452Z","updated_at":"2025-03-14T11:30:27.326Z","avatar_url":"https://github.com/BetterTyped.png","language":"TypeScript","funding_links":["https://github.com/sponsors/prc5","https://github.com/sponsors/prc5?tier=platinum","https://github.com/sponsors/prc5?tier=Platinum","https://github.com/sponsors/prc5?tier=Gold","https://github.com/sponsors/prc5?tier=gold","https://github.com/sponsors/prc5?tier=Silver"],"categories":["TypeScript"],"sub_categories":[],"readme":"# 🖼 React Zoom Pan Pinch\n\n\u003e Super fast and light react npm package for zooming, panning and pinching html\n\u003e elements in easy way\n\n\u003cp\u003e\n  \u003ca href=\"https://bettertyped.com/\"\u003e\n    \u003cimg src=\"https://custom-icon-badges.demolab.com/static/v1?label=\u0026message=BetterTyped\u0026color=333\u0026logo=BT\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/react-zoom-pan-pinch\"\u003e\n    \u003cimg src=\"https://custom-icon-badges.demolab.com/npm/v/react-zoom-pan-pinch.svg?logo=npm\u0026color=e22121\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/prc5/react-zoom-pan-pinch\"\u003e\n    \u003cimg src=\"https://custom-icon-badges.demolab.com/github/stars/prc5/react-zoom-pan-pinch?logo=star\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/prc5/react-zoom-pan-pinch/blob/main/License.md\"\u003e\n    \u003cimg src=\"https://custom-icon-badges.demolab.com/github/license/prc5/react-zoom-pan-pinch?logo=law\u0026color=yellow\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/semantic-release/semantic-release\"\u003e\n    \u003cimg src=\"https://custom-icon-badges.demolab.com/badge/semver-commitzen-e10079?logo=semantic-release\u0026color=e76f51\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/react-zoom-pan-pinch\"\u003e\n    \u003cimg src=\"https://custom-icon-badges.demolab.com/npm/dm/react-zoom-pan-pinch?logoColor=fff\u0026logo=trending-up\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/react-zoom-pan-pinch\"\u003e\n    \u003cimg src=\"https://custom-icon-badges.demolab.com/bundlephobia/minzip/react-zoom-pan-pinch?color=E10098\u0026logo=package\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/prc5/react-zoom-pan-pinch\"\u003e\n    \u003cimg src=\"https://custom-icon-badges.demolab.com/badge/typescript-%23007ACC.svg?logo=typescript\u0026logoColor=white\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hits.sh/github.com/prc5/react-zoom-pan-pinch/\"\u003e\n    \u003cimg src=\"https://hits.sh/github.com/prc5/react-zoom-pan-pinch.svg?color=64BC4B\u0026logo=bookmeter\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/maciej_pyrc\"\u003e\n    \u003cimg alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/maciej_pyrc?label=Follow%20\u0026style=social\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n#### Sources\n\n- [Demo](https://BetterTyped.github.io/react-zoom-pan-pinch/?path=/story/examples-big-image--big-image)\n- [Docs](https://BetterTyped.github.io/react-zoom-pan-pinch/?path=/story/docs-props--page)\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/sponsors/prc5?tier=platinum\"\u003e\n\t\t\u003cpicture\u003e\n\t\t\t\u003cimg width=\"830\" src=\"https://raw.githubusercontent.com/prc5/sponsors/main/assets/Platinum.png\" alt=\"Premium sponsor banner\"/\u003e\n\t\t\u003c/picture\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/sponsors/prc5?tier=Platinum\"\u003e\n\t\t\u003cpicture\u003e\n\t\t\t\u003cimg width=\"830\" src=\"https://raw.githubusercontent.com/prc5/sponsors/main/packages/platinum/sponsorkit/sponsors.svg\" alt=\"Premium sponsor banner\"/\u003e\n\t\t\u003c/picture\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n## Key Features\n\n- 🚀 Fast and easy to use\n- 🏭 Light, without external dependencies\n- 💎 Mobile gestures, touchpad gestures and desktop mouse events support\n- 🎁 Powerful context usage, which gives you a lot of freedom\n- 🔧 Highly customizable\n- 👑 Animations and Utils to create own tools\n- 🔮 Advanced hooks and components\n\n## Try other BetterTyped projects\n\nDo you like this library? Try out other projects\n\n\u003ca href=\"https://github.com/BetterTyped/hyper-fetch\"\u003e\n  \u003cimg width=\"200px\" src=\"https://raw.githubusercontent.com/BetterTyped/hyper-fetch/main/.github/assets/readme.png\" alt=\"Hyper Fetch\" /\u003e\n\u003c/a\u003e\n\n**[⚡Hyper Fetch](https://github.com/BetterTyped/hyper-fetch)** - Fetching and\nrealtime data exchange framework.\n\n---\n\n## Installation\n\n```bash\nnpm install --save react-zoom-pan-pinch\nor\nyarn add react-zoom-pan-pinch\n```\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/sponsors/prc5?tier=Gold\"\u003e\n\t\t\u003cpicture\u003e\n\t\t\t\u003cimg width=\"830\" src=\"https://raw.githubusercontent.com/prc5/sponsors/main/assets/Gold.png\" alt=\"Premium sponsor banner\"/\u003e\n\t\t\u003c/picture\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/sponsors/prc5?tier=gold\"\u003e\n\t\t\u003cpicture\u003e\n\t\t\t\u003cimg width=\"830\" src=\"https://raw.githubusercontent.com/prc5/sponsors/main/packages/gold/sponsorkit/sponsors.svg\" alt=\"Premium sponsor banner\"/\u003e\n\t\t\u003c/picture\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n## Examples\n\n```jsx\nimport React, { Component } from \"react\";\n\nimport { TransformWrapper, TransformComponent } from \"react-zoom-pan-pinch\";\n\nconst Example = () =\u003e {\n  return (\n    \u003cTransformWrapper\u003e\n      \u003cTransformComponent\u003e\n        \u003cimg src=\"image.jpg\" alt=\"test\" /\u003e\n      \u003c/TransformComponent\u003e\n    \u003c/TransformWrapper\u003e\n  );\n};\n```\n\nor\n\n```jsx\nimport React, { Component } from \"react\";\n\nimport {\n  TransformWrapper,\n  TransformComponent,\n  useControls,\n} from \"react-zoom-pan-pinch\";\n\nconst Controls = () =\u003e {\n  const { zoomIn, zoomOut, resetTransform } = useControls();\n\n  return (\n    \u003cdiv className=\"tools\"\u003e\n      \u003cbutton onClick={() =\u003e zoomIn()}\u003e+\u003c/button\u003e\n      \u003cbutton onClick={() =\u003e zoomOut()}\u003e-\u003c/button\u003e\n      \u003cbutton onClick={() =\u003e resetTransform()}\u003ex\u003c/button\u003e\n    \u003c/div\u003e\n  );\n};\n\nconst Example = () =\u003e {\n  return (\n    \u003cTransformWrapper\n      initialScale={1}\n      initialPositionX={200}\n      initialPositionY={100}\n    \u003e\n      {({ zoomIn, zoomOut, resetTransform, ...rest }) =\u003e (\n        \u003c\u003e\n          \u003cControls /\u003e\n          \u003cTransformComponent\u003e\n            \u003cimg src=\"image.jpg\" alt=\"test\" /\u003e\n            \u003cdiv\u003eExample text\u003c/div\u003e\n          \u003c/TransformComponent\u003e\n        \u003c/\u003e\n      )}\n    \u003c/TransformWrapper\u003e\n  );\n};\n```\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/sponsors/prc5?tier=Silver\"\u003e\n\t\t\u003cpicture\u003e\n\t\t\t\u003cimg width=\"830\" src=\"https://raw.githubusercontent.com/prc5/sponsors/main/assets/Silver.png\" alt=\"Premium sponsor banner\" /\u003e\n\t\t\u003c/picture\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/sponsors/prc5?tier=Silver\"\u003e\n\t\t\u003cpicture\u003e\n\t\t\t\u003cimg width=\"830\" src=\"https://raw.githubusercontent.com/prc5/sponsors/main/packages/silver/sponsorkit/sponsors.svg\" alt=\"Premium sponsor banner\" /\u003e\n\t\t\u003c/picture\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n## License\n\nMIT © [prc5](https://github.com/prc5)\n\n## Help me keep working on this project ❤️\n\n- [Become a Sponsor on GitHub](https://github.com/sponsors/prc5)\n\n## 💖 Our sponsors\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/sponsors/prc5\"\u003e\n\t\t\u003cimg src=\"https://raw.githubusercontent.com/prc5/sponsors/main/packages/other/sponsorkit/sponsors.svg?raw=true\" alt=\"My Sponsors\" /\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBetterTyped%2Freact-zoom-pan-pinch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBetterTyped%2Freact-zoom-pan-pinch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBetterTyped%2Freact-zoom-pan-pinch/lists"}