File drop
Takes files from a drag or from the device's picker, and shows each one's upload as it goes, so a person knows which files arrived, which are still on their way, and which failed and why.
Examples
Drop files here, or
PDF, CSV or an image, up to 10 MB each
- Rental agreement, Harbour suite.pdfUploaded1.8 MB
- Deposit invoice BK-48215.pdfUploading
- Group rooming list.csvThe connection dropped at 60%.
Fund list
Drop files here, or
A CSV with one fund per row, up to 5 MB
The first row names the columns: fund, adviser, gross assets.
Logo on invoices
Drop files here, or
A PNG or SVG, up to 200 KB
States
Drop files here, or
Documents close when the guest checks out
- Final invoice BK-48201.pdfUploaded268 KB
Drop files here, or
PDF, CSV or an image, up to 10 MB each
- Rental agreement, Harbour suite.pdfUploaded1.8 MB
Usage
Use it when
- A booking's documents, a contract, an import: files that go to a server and take a moment each.
- A person may add several files and needs to see which arrived.
Use something else when
- A single avatar, logo or cover, placed before it is saved. Use ImageField instead, which crops and uploads one picture in place.
- Text a person could paste, such as a list of tickers. Use Textarea instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/file-drop.jsonimport { FileDrop, accepts, fileDropLabels, type DropFile } from "@/components/cobalt/ui/file-drop"Related
- Fieldholds a form's other controls; FileDrop names itself through its button and hint, so it sits under a heading instead.
- Inputone line of typed text; a file comes through FileDrop, never a styled
type="file"field. - FileTileone file's tile, the one each file here is drawn with, also for a message or a composer.
- FileTypeIconthe glyph that draws a file's upload on itself.
