File Icons
File-type illustrations for attachments, upload rows, and file cards.
File icons are the folded-sheet illustrations inside File Card. Each icon stamps a short label on a paper sheet, and the label band takes its color from the file family. The same illustration is what an attachment list uses to tell a PDF from a spreadsheet at a glance.
Document
Spreadsheet
Presentation
Archive
Image
Video
Audio
Code
Other
Import
Section titled “Import”import { FileCard, fileTypeFromName } from "@zentara-co/zenos-ui";Pass a family with type, or derive it from a filename. The icon is decorative: the filename beside it names the file. Pass aria-label only when the icon stands alone.
<FileCard.Icon type="pdf" /><FileCard.Icon type={fileTypeFromName("Q3 revenue.xlsx")} /><FileCard.Icon type="code" label="TSX" />label replaces the short stamp. Use it when a product-specific extension should read differently from the family default, such as TSX on a code file. Leave it unset for the family’s own label.
Categories
Section titled “Categories”fileTypeFromName reads the extension, ignores letter case, and returns one of ten families. An unknown extension, or a name with no extension, returns default. Prefer a trusted MIME type when the filename may be incomplete.
| Family | Stamp | Tone | Extensions |
|---|---|---|---|
pdf | Red | ||
document | DOC | Blue | doc, docx, odt, rtf, txt |
spreadsheet | XLS | Green | csv, ods, xls, xlsx |
presentation | PPT | Orange | key, odp, ppt, pptx |
archive | ZIP | Yellow | 7z, gz, rar, tar, zip |
image | IMG | Purple | gif, heic, jpeg, jpg, png, svg, webp |
video | VID | Magenta | avi, mkv, mov, mp4, webm |
audio | AUD | Teal | aac, flac, m4a, mp3, ogg, wav |
code | CODE | Indigo | css, html, js, json, jsx, md, py, ts, tsx, yaml, yml |
default | FILE | Gray | Anything else |
Tones use accent tokens, so they follow the active theme.
In a file card
Section titled “In a file card”File Card places the icon at the start of a row or at the top of a tile. Pass the derived type and keep the real filename in FileCard.Name. The card page covers progress, upload state, and actions.
Inside a card, the icon size follows the card layout and density. A comfortable row uses the larger sheet; compact rows and tiles scale it with the card. Override the frame with className when the icon needs a different box outside that layout.