You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[#13](https://github.com/Lemoncode/react-image-focal-point/pull/13)[`6154ffa`](https://github.com/Lemoncode/react-image-focal-point/commit/6154ffa419795545eeb33ca5cd24265fb12e5ed6) Thanks [@Nasdan](https://github.com/Nasdan)! - Let the user set the picture focal point just by visually dragging and dropping on top of the selected image.
8
+
9
+
Install _React Image Focal Point_ using your favorite package manager like [npm](https://www.npmjs.com/):
10
+
11
+
```bash
12
+
npm install @lemoncode/react-image-focal-point
13
+
14
+
```
15
+
16
+
or via [yarn](https://classic.yarnpkg.com/lang/en/):
17
+
18
+
```bash
19
+
yarn add @lemoncode/react-image-focal-point
20
+
21
+
```
22
+
23
+
This library has `peerDependencies` listings for `react` and `react-dom`. You will need to install these packages in your project in order to use this library.
src="your-image-src"// Same src as <img> HTML element
49
+
onChange={focalPoint=> {
50
+
// Add here your code to do whatever you want to when the user drags on the focal point
51
+
}}
52
+
/>
53
+
);
54
+
};
55
+
```
56
+
57
+
Check out our official [documentation](https://lemoncode.github.io/react-image-focal-point)
58
+
59
+
You'll find runnable examples in the [docs site](https://lemoncode.github.io/react-image-focal-point/docs/examples/basic) and in the [examples folder](https://github.com/Lemoncode/react-image-focal-point/tree/main/examples).
0 commit comments