Skip to content

girishsawant999/image-edit-tool

Repository files navigation

Project logo

React Image Edit

Status GitHub Issues GitHub Pull Requests

Build License


A react npm package to crop, rotate & resize image before saving or upload.

React Image Edit Playground

📝 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

Prop Types Description
src string An image source url
onSave (url: string) => void A callback function on save button click gives you updated image url
maxWidth number
Default: 600
Final resize width for updated image height will be according to aspect ratio
saveButtonText string
Default: Save
Button text for final save update
containerClassName string Classes for container
imgClassName string Classes for Image tag
toolbarClassName string Classes for toolbar div

About

A react package to edit image file.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published