import React, { useState } from "react";
import { Cropper } from "react-advanced-cropper";
import "react-advanced-cropper/dist/style.css";
const Example = () => {
let image = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTV_NaGTKWnAwn8j_yuPFVSDBtV4xfBbo7uPw&s"
return (
<div className="example">
<div className="example__cropper-wrapper">
<Cropper className="example__cropper" src={image} />
</div>
</div>
);
};
export default Example;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter