Skip to content
RivetUI

File Upload

Selects and validates files through a native picker or drag and drop.

@rivetui/file-upload

Preview

Explore each composition interactively, then open its code in the same context.

Default

Accept multiple files with shared type, count, and size constraints.

Note
Set disabled on FileUpload to disable the dropzone and file controls together.

Compact

Fit file selection into a standard control row without losing drag and drop.

Single file

Omit multiple when the workflow accepts exactly one file.

Registry

Installation

Add the component source and its declared dependencies with the shadcn CLI.

Install component
bunx --bun shadcn@latest add @rivetui/file-upload
Inspect registry item

Public interface

API reference

Component-specific props are listed here. Native element and Base UI props continue to pass through.

FileUpload

PropTypeDefault
valueFile[]—
defaultValueFile[][]
onValueChange(files: File[]) => void—
acceptstring—
multiplebooleanfalse
maxFilesnumber1 / ∞ when multiple
maxSizenumber—
disabledbooleanfalse
onFileReject(rejection: FileUploadRejection) => void—

FileUploadDropzone

PropTypeDefault
size"sm" | "md""md"
classNamestring—

Use size="sm" for a button-height picker. The compact layout keeps click and drag-and-drop behavior and shows the selected filename inline.

Rivet UI / File UploadComponents engineered, not decorated.