react-picture-cropper

0.1.8 • Public • Published

React picture cropper is a React component for picture cropping and uploading from the front-end.

Example Usage

  • 1.Install the package:
npm install react-picture-cropper
  • 2.Import the component to your code as a normal React component:
import PicCropper from "react-picture-cropper"
import { render } from "react-dom"
import React from "react"
function App(){
    return(
        <PicCropper action="path"/>
    )
}
render(
    App(),
    document.getElementById("root")
)

action: The path you upload your image

Demo

  • 1.Enter the root directory of the module(in node_modules)
  • 2.Run the demo
npm run demo1
  • 3.Visit http://localhost:8080/index.html in your browser
  • 4.Select one pic and upload it the your local server, you'll find the uploaded picture at /demo/upload/ as "fileData.png"

Package Sidebar

Install

npm i react-picture-cropper

Weekly Downloads

0

Version

0.1.8

License

ISC

Last publish

Collaborators

  • 673212779qq.com