Skip to main content
Version: 1.0.5

IDropFileAreaProps

@spartanfx/react v1.0.5


@spartanfx/react / IDropFileAreaProps

Interface: IDropFileAreaProps

Props for the DropFileArea component.

Properties

PropertyTypeDescription
allowedTypes?MimeTypes[]Optional list of accepted MIME types for validating uploaded files. If not provided, all file types are accepted.
appearance?AppearanceModeExplicit appearance control. - auto (default): follow Fluent UI theme - light: force light mode - dark: force dark mode
disabled?booleanWhether the component is disabled.
errorstringError message string to display below the drop area.
helperText?stringOptional helper text displayed below the main label.
label?stringOptional custom label for the drop area.
maxFiles?numberOptional cap (mainly useful in multiple mode).
multiple?booleanIf false/undefined, keeps at most 1 file (still returns File[]).
onChange(files) => voidCallback function triggered when a file is selected or dropped.
selectedFilesFile[]The currently selected file.
setError(msg) => voidFunction to update the error message.