Skip to main content

ImageCropper

Components

ImageCropper()

ImageCropper(props, context?): ReactNode

An ImageCropper component makes the task of cropping an image much easier. It also makes the task of including an image cropper in your app more straightforward. The component makes use of the react-easy-crop library under the hood and accepts some additional props as listed below:

Parameters

ParameterType
propsImageCropperProps
context?any

Returns

ReactNode

Example

 <ImageCropper image={selectedImage} onCrop={setCroppedImage} />

Source

libs/design-system-core/src/components/ImageCropper/index.tsx:39

Props

ImageCropperProps

ImageCropperProps: Partial<Omit<CropperProps, "image">> & object

Type declaration

MemberType
dragToRepositionLabelstring
imagestring | Image
onCrop(image) => void

Source

libs/design-system-core/src/components/ImageCropper/index.tsx:13