Skip to content

sbscomp/react-croppie

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-croppie

an image cropping plugin based on Croppie keep in mind this is a work in progress and not all the features of croppie are yet available ##install

Npm: npm install react-croppie

##using react-croppie

###in your react component:

  var Croppie = require("react-croppie");
  ...
  render(){
    return <Croppie url="path/to/image"/>
  }

###in your html file :

<link rel="stylesheet" href="node_modules/react-croppie/cropper.css">

##documentation

you can pass props to react-croppie component based on croppie docs

###the result currently we only support canvas type from croppie docs

var Croppie = require("react-croppie");
...
render(){
 return <Croppie url="path/to/image" ref="reactCroppie"/>
},
...
getResult(options){
  this.refs.reactCroppie.result(options).then( res =>{
    //do whatever you like with the result
  });
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.8%
  • CSS 5.2%