recrop
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

recrop

a customizable image-crop / region-selection component for React.

Demo

https://meowtec.github.io/recrop/

Usage

npm i recrop --save
import { ImageCrop } from 'recrop'
 
class ImageCropApp extends PureComponent {
  state = {
    crop: null,
  }
 
  handleCropChange = (crop) => {
    this.setState({ crop })
  }
 
  render() {
    return (
      <div style={{ height: 400, width: 600 }}>
        <ImageCrop
          crop={this.state.crop}
          src="your_image_url"
          onChange={this.handleCropChange}
        />
      </div>
    )
  }
}

Feature

  • Customizable
  • Write in TypeScript

For more usages see demo

Readme

Keywords

Package Sidebar

Install

npm i recrop

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

85.9 kB

Total Files

25

Last publish

Collaborators

  • meowtec