Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bettertyped/react-zoom-pan-pinch

๐Ÿ–ผ React library to support easy zoom, pan, pinch on various html dom elements like <img> and <div>
https://github.com/bettertyped/react-zoom-pan-pinch

figma gesture html-manipulation miro pan pinch react react-component svg zoom zoomin zoomout

Last synced: 2 days ago
JSON representation

๐Ÿ–ผ React library to support easy zoom, pan, pinch on various html dom elements like <img> and <div>

Awesome Lists containing this project

README

        

# ๐Ÿ–ผ React Zoom Pan Pinch

> Super fast and light react npm package for zooming, panning and pinching html
> elements in easy way






























Twitter Follow

#### Sources

- [Demo](https://BetterTyped.github.io/react-zoom-pan-pinch/?path=/story/examples-big-image--big-image)
- [Docs](https://BetterTyped.github.io/react-zoom-pan-pinch/?path=/story/docs-props--page)




Premium sponsor banner





Premium sponsor banner


## Key Features

- ๐Ÿš€ Fast and easy to use
- ๐Ÿญ Light, without external dependencies
- ๐Ÿ’Ž Mobile gestures, touchpad gestures and desktop mouse events support
- ๐ŸŽ Powerful context usage, which gives you a lot of freedom
- ๐Ÿ”ง Highly customizable
- ๐Ÿ‘‘ Animations and Utils to create own tools
- ๐Ÿ”ฎ Advanced hooks and components

## Try other BetterTyped projects

Do you like this library? Try out other projects


Hyper Fetch

**[โšกHyper Fetch](https://github.com/BetterTyped/hyper-fetch)** - Fetching and
realtime data exchange framework.

---

## Installation

```bash
npm install --save react-zoom-pan-pinch
or
yarn add react-zoom-pan-pinch
```




Premium sponsor banner





Premium sponsor banner


## Examples

```jsx
import React, { Component } from "react";

import { TransformWrapper, TransformComponent } from "react-zoom-pan-pinch";

const Example = () => {
return (


test


);
};
```

or

```jsx
import React, { Component } from "react";

import {
TransformWrapper,
TransformComponent,
useControls,
} from "react-zoom-pan-pinch";

const Controls = () => {
const { zoomIn, zoomOut, resetTransform } = useControls();

return (


zoomIn()}>+
zoomOut()}>-
resetTransform()}>x

);
};

const Example = () => {
return (

{({ zoomIn, zoomOut, resetTransform, ...rest }) => (
<>


test

Example text


>
)}

);
};
```




Premium sponsor banner





Premium sponsor banner


## License

MIT ยฉ [prc5](https://github.com/prc5)

## Help me keep working on this project โค๏ธ

- [Become a Sponsor on GitHub](https://github.com/sponsors/prc5)

## ๐Ÿ’– Our sponsors



My Sponsors