In Review

File Upload

The File Upload component allows users to upload one or multiple files from their local device to a web application. It provides a user-friendly interface for attaching documents, images, or other types of files as part of form submissions. The component is customizable, supporting various file types, size limits, and even batch uploads, making it versatile for a wide range of use cases. Whether for uploading personal data or sharing project files, this component is a key part of modern web interactions.

Variants

Default

<label
  for="file-upload-id"
  class="gi-text-md gi-mb-1 gi-label">
  Upload File
</label>
<input
  id="file-upload-id"
  class="gi-file-upload-input"
  type="file"
  name="file"
  accept="*/*"
/>
{{ govieFileUpload({
  "id": "file-upload-id",
  "label": {
    "content": "Upload File",
    "for": "file-upload-id"
  },
  "hint": {
    "content": ""
  },
  "error": {
    "content": ""
  }
}) }}
import { FileUpload } from "@govie-ds/react";

<FileUpload
  accept="*/*"
  error={{
    text: ''
  }}
  hint={{
    text: ''
  }}
  id="file-upload-id"
  label={{
    htmlFor: 'file-upload-id',
    text: 'Upload File'
  }}
/>

Usage

Best Practices

When to use this component

When not to use this component

Status

Figma Library
Considering
Local HTML
Stable
Global HTML
Beta
Global React
Beta