About this set
Three compact file cards that cover the life of an upload: in progress, uploaded and failed. Each card shows a file-type badge drawn in CSS (a grey page with a folded corner and a coloured FIG, PDF or ZIP tag), the file name in a heading that truncates with an ellipsis, a status line and icon buttons on the right. The uploading card adds a thin progress bar with role=”progressbar” and its value in aria-valuenow, and offers Cancel. The uploaded card shows a green Uploaded label with Download and Delete, and the failed card shows a red Upload failed label with the reason, Retry and Remove. Use the set for upload queues, attachment lists and file managers; the three states share one layout, so a card can switch state without moving. Every icon button has a label that names the file, so a list of many files still reads clearly. The Bootstrap version uses .card, the stock .progress and .progress-bar, .badge and .btn restyled through their CSS variables; the Tailwind version is utilities only, including the folded corner.
What’s included
- Uploading, uploaded and failed states in one layout
- File-type badge with a folded corner drawn in CSS
- Progress bar exposed as role="progressbar" with a value
- Icon buttons labelled with the action and the file name
- Long file names truncate with an ellipsis
Accessibility
File names are h2 headings, the progress bar has an accessible name and aria-valuenow, and the status text is written out as Uploaded or Upload failed rather than shown by colour alone. Each icon button has an aria-label such as Retry upload of site-backup-aug.zip, the icons and type badges are aria-hidden, and buttons show a 2px indigo focus ring. The hover shadow transition is switched off under reduced motion.
Customise it
The badge colour is --c on .pdf, .fig and .zip (plain CSS and Bootstrap) or the bg- class on each tag (Tailwind). The progress colour is #4f46e5 on .bar i, --bs-progress-bar-bg in Bootstrap, or the bar's bg- class in Tailwind; set its width and aria-valuenow together.




















