Upload - Keep React
Table of Contents#
Default Upload#
The Default Upload component allows users to select and upload a file. When a file is selected, the onDrop callback is triggered to handle the file selection and update the name of the selected file.
Horizontal Upload#
To display the upload component in a horizontal layout, set the horizontal prop to true.
Single Upload#
By default, the upload component allows users to select multiple files. To restrict users to uploading a single file, set the multiple prop to false within the options object.
Upload Disabled#
To prevent users from uploading files, use the disabled prop set to true within the options props.
API Reference#
Explore the available props for the upload component
| Property | Description | Type | Default |
|---|---|---|---|
| children | Children is upload content | ReactNode | ReactNode |
| className | Custom className for customize style | string | None |
| horizontal | Upload show horizontally or vertically | boolean | false |
| options | Option is object for controlling the upload | DropzoneOptions | DropzoneOptions |
Reference#
Our Upload component is built using the react-dropzone package. For more information , follow the documentation react-dropzone.