Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-cropper

> 前端框架
Open source

Cropperjs as React component

2.1K stars0 likes2 views
WebsiteGitHub

About

Cropperjs as React component

react-cropper

Cropperjs as React component

Demo

Click for a Demo

Docs

  • Cropperjs

Installation

Install via npm

bash
npm install --save react-cropper

You need cropper.css in your project which is from cropperjs. Since this project have dependency on cropperjs, it located in /node_modules/react-cropper/node_modules/cropperjs/dist/cropper.css or node_modules/cropperjs/dist/cropper.css for npm version 3.0.0 later

Quick Example

…

Options

src

  • Type: string
  • Default: null
javascript
<Cropper src="http://fengyuanchen.github.io/cropper/images/picture.jpg" />

alt

  • Type: string
  • Default: picture

crossOrigin

  • Type: string
  • Default: null

dragMode

https://github.com/fengyuanchen/cropperjs#dragmode

scaleX

https://github.com/fengyuanchen/cropperjs#scalexscalex

scaleY

https://github.com/fengyuanchen/cropperjs#scalexscaley

enable

https://github.com/fengyuanchen/cropperjs#enable

disable

https://github.com/fengyuanchen/cropperjs#disable

zoomTo

https://github.com/fengyuanchen/cropperjs#zoomto

rotateTo

https://github.com/fengyuanchen/cropperjs#rotateto

Other options

Accept all options in the docs as properties.

Methods

Use the cropper instance from onInitialized to access cropperjs methods

Build

bash
npm run build

Development

bash
npm start

Author

Fong Kuanghuei

Maintainer

Shubhendu Shekhar

License

MIT

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptcropcrop-imagecroppercropperjs

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架