Giter Site home page Giter Site logo

trylogout / mini-react-cropper Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 360 KB

A versatile image cropping component for React applications

License: MIT License

TypeScript 44.46% JavaScript 47.59% SCSS 7.95%
crop crop-image cropper react react-components react-cropper mini-react-cropper

mini-react-cropper's Introduction

Mini React Cropper

Mini React Cropper is a versatile image cropping component for React applications. It allows users to select and crop a specific area of an image, providing various customization options such as shape, border type, zooming, and more.

drawing

Features

  • Easy-to-use and intuitive image cropping functionality.
  • Support for rectangular or round cropping shapes.
  • Configurable border type, color, and dot color.
  • Zoom in and zoom out options with customizable zoom levels.
  • Ability to specify minimum and maximum zoom levels.
  • Drag and resize functionality for the crop area.
  • Callbacks for capturing cropped image data.
  • Customizable styles and classes for easy integration with your project's UI.

Installation

To install the Mini React Cropper, use npm or yarn:

npm install mini-react-cropper

or

yarn add mini-react-cropper

Usage

Here's a basic example demonstrating how to use the Cropper Component in your React application:

import React from 'react';
import MiniCropper from 'mini-react-cropper';

const App = () => {
  const handleSubmit = (croppedImage) => {
    // Handle the cropped image data base64
    console.log('Cropped Image:', croppedImage);
  };

  return (
    <div>
      <h1>Image Cropper Demo</h1>
      <MiniCropper image='base64image' onSubmit={handleSubmit} />
    </div>
  );
};

export default App;

For detailed usage instructions and available props, please refer to the documentation.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

Package Information

NPM

License

This package is open source and available under the MIT License.

mini-react-cropper's People

Contributors

trylogout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.