Skip to content
Forms

File Dropzone

Drag-and-drop file upload area.

Import

tsx
import { FileDropzone } from "@cronus-ui/ui";
bash
npx cronus-ui add file-dropzone

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component FileDropzoneDefault layout:inline style:file-dropzone {
  aria-label:"Upload files"
  label "Upload files"
}

page "/audit/file-dropzone/default" type:custom {
  use FileDropzoneDefault
}

API Reference

Generated from the component's exported types.

FileDropzoneLabels

Skip FileDropzoneLabels props table
PropTypeDefaultDescription
upload*
string——
drop*
string——
browse*
string——

FileDropzoneProps

Skip FileDropzoneProps props table
PropTypeDefaultDescription
onFiles*
(files: File[]) => void——
accept
string——
multiple
booleanfalse—
disabled
booleanfalseDisables pointer and keyboard interaction.
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
aria-label
string—Accessible name for the file input. Defaults to `"Upload files"` so the control is never nameless.
aria-describedby
string—IDs of element(s) that describe the dropzone (e.g. accepted types).
labels
Partial<FileDropzoneLabels>—Override the default English strings.