Skip to main content

API

ImageUploadProps

NameDescriptionTypeDefault
childrencustom upload zoneReact.ReactNode
widthimage widthnumber100
heightimage heightnumberwidth
valuedefault imagesstring | ValueItem | (string | ValueItem)[][]
onChangecallback for when the images changes(value: ImageItem[]) => void
onUploadcallback for when the drop event occurs(file: File) => string | Promise<string>(file: File) => URL.createObjectURL(file)
maxmax image numbernumberInfinity
readonlyfor previewboolean
classNameroot classNamestring
itemClassNameimage classNamestring
dropzoneClassNamedropzone classNamestring
dropzoneOptionsDropzoneOptions
photoProviderPropsOmit<PhotoProviderProps, "children">

Types

type ValueItem = {
url: string;
name?: string;
};

type ImageItem = {
id: string;
url?: string;
name?: string;
file?: File;
loading?: boolean;
};

DropzoneOptions

react-dropzone

PhotoProviderProps

react-photo-view