2.5.4 • Published 4 years ago

antd-img-crop-royaltymine v2.5.4

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

antd-img-crop

An custom royaltymine image cropper for Ant Design Upload.

npm npm npm bundle size GitHub

English | 简体中文

Demo

Edit antd-img-crop

Install

yarn add antd-img-crop

Usage

import ImgCrop from 'antd-img-crop';
import { Upload } from 'antd';

const Demo = () => (
  <ImgCrop>
    <Upload>+ Add image</Upload>
  </ImgCrop>
);

Props

NameTypeDefaultDescription
widthnumber100Width of cropped image in px.
heightnumber100Height of cropped image in px.
containbooleanfalseConsistent with background-size: contain, crop area will fill the width or height.
useRatio--Deprecated, please use contain.
resizebooleantrueIf crop area can resize.
resizeAndDragbooleantrueIf crop area can resize and drag.
modalTitlestring"Edit image"Title of modal.
modalWidthnumber520Width of modal in px.
beforeCropfunction-Execute before crop, modal will not open if return false (Not support Promise). beforeUpload prop of Upload will execute after crop, before upload.

new File error? try https://github.com/jimmywarting/FormData/issues/11#issuecomment-277522987

License

MIT License (c) nanxiaobei

2.5.4

4 years ago

2.5.2

4 years ago

2.5.3

4 years ago

2.4.14

4 years ago

2.5.1

4 years ago

2.4.15

4 years ago

2.4.13

4 years ago

2.4.10

4 years ago

2.4.12

4 years ago

2.4.9

4 years ago

2.4.11

4 years ago

2.4.8

4 years ago

2.4.7

4 years ago

2.4.6

4 years ago

2.4.5

4 years ago