react-cropped-image

1.0.0 • Public • Published

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}/>
 
Property Description Type Default Prop
src Source of the Image to be Cropped string ""
x X Coordinate of the Top Left Corner to start cropping from. number
Y Y Coordinate of the Top Left Corner to start cropping from. number
cropHeight Height of the Crop Box (from (X,Y) Coordinate Down to (X, Y+cropHeight) Coordinate ) number
cropWidth Width of the Crop Box (from (X,Y) Coordinate Down to (X+cropWidth, Y) Coordinate ) number
onError Throws Error if Error Loading function

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i react-cropped-image

    Weekly Downloads

    5

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    12.3 kB

    Total Files

    12

    Last publish

    Collaborators

    • inf3cti0n95