Skip to content
HomeCobalt

File tile

Shows one file as one tile, with its kind, its name and one line about it, so a person can tell which file it is, download it once it is there, and see how its upload is going.

Examples

The documents filed with a fund's annual report. Each tile shows its kind's glyph, or a picture as its own thumbnail, its name with the extension always in view, and its kind and size; a press downloads it.
CompactThe 48px tiles of a message composer, in a row above what is being written: a picture that failed with its glyph as Retry, a file on its way up and one ready, each with Remove. The row scrolls sideways and fades at the edge that has more.
  • Office.jpgUpload failed
  • Cap table.xlsxUploading, 55%
  • Term sheet draft.docxDOCX, 182 KB
FailedAn upload that did not finish. The glyph stays grey with the retry arrow and becomes the Retry button; the first retry here succeeds.
Side letter, Harbour Capital.pdfUpload failed
RefusedA file the list does not take stays where it would have been, with the reason in red, until it is dismissed. Nothing about it was sent.
Board meeting recording.movOver 100 MB
UploadingTwo files on their way up. The glyph, or the picture, is grey and its colour rises from the bottom as the share grows; the line under the name says how far. Press Upload again to watch it from the start.
  • Quarterly holdings, Q3 2026.csvUploading, 0%
  • Site visit.jpgUploading, 0%
In a cardA filing's documents on its record card. On a white card the tiles take the grey fill, and they sit two to a row from 640px up.
In a messageThe bubble variants, which MessageFile draws in a conversation: `bubble` for theirs at the start in the grey fill, `bubble-mine` for yours at the end in the ink fill, each with the bubble's corner and the line under the name in its ink, faded.

Usage

Use it when

  • A file attached to a record, a message or a filing, that a person reads by name and downloads.
  • A file on its way up, in a list of attachments or a composer's row, while its upload runs or after it failed.

Use something else when

  • A thing shown by its picture first, such as a venue or a listing, with its name under the photo. Use MediaTile instead.
  • Photos sent in a message, meant to be looked at. Use MessageAttachment instead, whose MessageImages lays them out.
  • A place to drop or choose files. Use FileDrop instead, which draws its rows with this tile.
  • A table of many files with columns to sort, such as a document library. Use DataTable instead.

Rules

General

Content

Avoid

Limits

Install

npx shadcn@latest add https://kaanarici.com/r/cobalt/file-tile.json
import { FileTile, fileTileLabels } from "@/components/cobalt/ui/file-tile"