shadcn.io is not affiliated with official shadcn/ui
Upload Queue Preview Gallery Block for React
A file drop zone that lists every file you pick or drop (name and size, never opened) beside a queue of four seeded files in their states, with Retry, Remove and a Send button.
Installation
Overview
An upload queue for React with Base UI, for Dropbay, a file-drop service. A split puts a header and the catalog file-upload drop zone (framed, with + marks) at the start and, past the divider, a queue in a region that keeps one height. The queue starts with four files in four states: uploaded, uploading with a progress bar, uploaded, and failed with a Retry button. Files you pick or drop join as "Queued", each with its name, its real size and a drawn stand-in thumbnail chosen from its name: the block never opens or reads a file. Remove takes one out, Retry puts the failed one back in the queue, and Send marks every queued file as uploaded. A polite line says "3 of 4 uploaded". Nothing is sent or saved in this demo. It's built from File Upload, Progress, Shine Button and Guides.
FAQ
Does it read the files I choose?
No. The drop zone hands the block each accepted file, and the block keeps only its name and its size. The thumbnail is a drawing picked from the file's type and a number made from its name, so the same name always draws the same picture. Nothing is uploaded, previewed from the file or stored.
How are the states told apart?
By words and a mark, never by colour alone: a tick and "Uploaded", a clock and "Queued", an alert mark and "Failed: the connection dropped", and "Uploading, 64%" with a thin bar in the theme's foreground. The bar is hidden from screen readers because the percentage is in the text.
What if a file is too big?
The drop zone refuses a file over 50 MB and the block says so in its status line ("big-video.mov is over 50 MB and was not added"); nothing is queued. Change MAX_BYTES and the hint under the drop zone for your own limit.
Does the queue grow the block?
No. The queue is a scrolling region of fixed height (focusable, so the keyboard can scroll it) and the foot band keeps its height; ten files scroll, four don't.
Related
- Pro
Media Library Gallery
Filter, sort and tabsA media manager drawn as a window in a hairline frame: tabs that filter by type, a search field, a List or Grid switch, twelve files with size and upload date, and an Empty state.
- Pro
Mixed Media Stage Gallery
Stage and thumbnailsOne stage that changes its controls with the file: a zoom slider for an image, a storyboard with Play and a scrub slider for a video, a waveform for audio, and page buttons for a document.
- Pro
Multi-Select Bulk Actions Gallery
Select and actEight drawn scans on shared hairlines, each with a checkbox, a Select all box that shows a mixed state, Shift to take a run, and a bar with Download, Share and an undoable Delete.
- Pro
File Attachments Contact
Support and feedbackA support request on a card in card with a file drop zone: up to four PDFs or images, a progress bar per file, an error row for a wrong type, and a form that waits for the files before it sends.
- Pro
Approval Sheet Gallery
Select and actEight drawn design proposals on shared hairlines, each with a status badge and an Approve or Request changes choice that can be cleared, and a running tally with a progress bar.
- Pro
Drag To Reorder Gallery
Select and actEight drawn portfolio pages in a framed grid that you reorder by dragging a grip, by Space and the arrow keys, or with Move earlier and Move later buttons, with every move announced and logged.