🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@muzikanto/cropper

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@muzikanto/cropper

image crop component

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Cropper

npm version downloads dependencies Status size

Introduction

Peer dependencies: react, react-dom, material-ui/core, material-ui/styles, material-ui/icons

Installation

npm i @muzikanto/cropper
# or
yarn add @muzikanto/cropper

Introduction

if you are interested in the package, please create an issue in github with your wishes, and then I will make changes

new features

  • add cross browser
  • add easy customizing styles
  • add light theme
  • add transition effects
  • add filters tab
  • add resize original tab
  • add limited selection
  • add easy use CropManager

Examples

Example in storybook

Use

function Component() {
    const [base64, setBase64] = React.useState('');
    
  return (
      <>
          <BaseCropper
              src="https://github.com/Muzikanto/cropper/blob/master/src/test.jpg"
              onChange={(v) => setBase64(v)}
    
              flippedX={true} // show flip x button
              flippedY={true} // show flip y button
              rotatedLeft={true} // show rotate left button
              rotatedRight={true} // show rotate right button
              rotateToAngle={true} // show bottom rotate line
              sizePreview={true} // show size preview
              aspectRatio={[
                  'free', 'square', 'landscape', 'portrait',
                  {icon: <CustomIcon/>, value: 13 / 10, label: 'custom'},
              ]} // list of aspects
              // aspectRatio={ 16 / 10 } one value => hide select aspectRatio
          />
          <img src={base64}/>
      </>
  );
}

License

MIT

Keywords

react

FAQs

Package last updated on 10 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts