1.0.0 • Published 5 years ago

react-cropped-image v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react-cropped-image

Commitizen friendly Build Status codecov npm

React Component to Render Cropped Image.

A Cleaner, Better way to render Cropped Image in React.

Installation

yarn add react-cropped-image

Usage

<CroppedImage src="kitty.png" x={topLeftCornerX} y={topLeftCornerY} cropHeight={cropHeight} cropWidth={cropWidth}/>
PropertyDescriptionTypeDefault Prop
srcSource of the Image to be Croppedstring""
xX Coordinate of the Top Left Corner to start cropping from.number
YY Coordinate of the Top Left Corner to start cropping from.number
cropHeightHeight of the Crop Box (from (X,Y) Coordinate Down to (X, Y+cropHeight) Coordinate )number
cropWidthWidth of the Crop Box (from (X,Y) Coordinate Down to (X+cropWidth, Y) Coordinate )number
onErrorThrows Error if Error Loadingfunction