1.0.5 • Published 5 years ago

recrop v1.0.5

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

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

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago