File Uploader
A file picker with drag-and-drop, in a dropzone variant and a compact one. The component is purely presentational - you own progress tracking and the upload logic, passing file entries back in via files.
Installation
npx stepwise-ui add file-uploader
Dropzone
One drop target, not two widgets glued together - the dashed box is the Folder's own hit area. Hover, tap, or focus it to see what's inside - each card shows its name on hover, and its own remove button, confirmed through the Modal component before anything's actually gone. Try it - drag one of the files below onto it.
Compact
The same Button with slideIcon you'll find everywhere else - it's also its own drop target. Drag a file over it and the icon swaps to an incoming arrow; the label answers with the file count once something's selected.
Props
PropTypeDescription
variant"dropzone" | "compact"Visual layout. Default "dropzone".
colorstring"dropzone" variant only - folder body color. Default: amber (#f5d98b).
filesFileEntry[]Controlled file list with optional progress.
onFiles(files: File[]) => voidCalled with accepted File objects. Caller tracks progress.
onRemove(id: string) => voidCalled after the remove is confirmed in the Modal.
acceptstringMIME types or file extensions (e.g. ".pdf,.docx").
multiplebooleanAllow multiple files. Default true.
maxMBnumberSilently skip files over this size (MB).