2.0.1 • Published 5 months ago

@girishsawant999/react-image-edit v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Status GitHub Issues GitHub Pull Requests

Build License


📝 Usage

Just install the package using command

npm install @girishsawant999/react-image-edit

And then import component in your react app

import ImageEditor from '@girishsawant999/react-image-edit';

// Use ImageEditor Component

<ImageEditor src={defaultURL} onSave={(url): void => setUrl(url)} saveButtonText="Preview" />;

That's all and you are ready to go.

📃 Props

PropTypesDescription
srcstringAn image source url
onSave(url: string) => voidA callback function on save button click gives you updated image url
maxWidthnumber Default: 600Final resize width for updated image height will be according to aspect ratio
saveButtonTextstring Default: SaveButton text for final save update
containerClassNamestringClasses for container
imgClassNamestringClasses for Image tag
toolbarClassNamestringClasses for toolbar div