Park UI

File Upload

A component for selecting and uploading files from the user's device.

    Installation

    Usage

    Shortcuts

    The FileUpload component also provides a set of shortcuts for common use cases.

    FileUpload.Items

    By default, the FileUpload.Items shortcut renders the list of uploaded files.

    This might be more concise if you don't need to customize the file upload items:

    FileUpload.List

    The FileUpload.List shortcut renders the list of uploaded files. It composes the FileUpload.ItemGroup and FileUpload.Items components.

    is the same as:

    Examples

    Accepted Files

    Specify the accepted file types for upload using the accept prop.

      Multiple Files

      Upload multiple files at once using the maxFiles prop.

        Image Preview

        Use the FileUpload.ItemPreviewImage component to render a preview of image files.

        Directory

        Use the directory prop to allow selecting a directory instead of a file.

          Media Capture

          Use the capture prop to capture and upload media directly from the device camera or microphone.

          Info

          The capture prop is only supported on mobile devices.

            Dropzone

            Drop multiple files inside the dropzone. Use the maxFiles prop to limit the number of files that can be uploaded at once.

            Drag and drop files here
            .png, .jpg up to 5MB

              Input

              Use the FileInput component to create a trigger that looks like a text input.

              Props

              Root

              Dropzone

              Item

              ItemPreview