# File types

Package: @commenda/pathfinder@0.1.0
Page: /docs/assets/file-types

<AssetExplorer collection="file-types" />

## Folders [#folders]

```tsx
import { Icons } from '@commenda/pathfinder';

<Icons.Folder status="closed" size={24} />
<Icons.Folder status="open" size={24} />
```

`status` is required and accepts `open` or `closed`. Sizes are 16 (default), 24, and 40. Native `width` and `height` can change display dimensions while `size` selects the authored drawing. These are the illustrated document folders; outline interface glyphs remain under `Icons.Interface`.

## Usage [#usage]

```tsx
import { FileTypeIcon, FileTypeHelper } from '@commenda/pathfinder/file-types';
<FileTypeIcon
  kind={FileTypeHelper.fromFilename('Annual report.PDF')}
  size={24}
/>;
```

**ASSET-FILE-01:** Use 16 for rows/chips/inline links, 24 for lists/tables, and 40 for uploads/cards. All 13 families and 39 variants are local. Preserve outlined lettering and type colors; no font is required to render the badges.

**ASSET-FILE-02:** Pair artwork with a filename. File kind is conveyed by badge lettering and filename, not color alone. The 16px JSON drawing exports at **17×16** because its badge extends outside the component; preserve that width rather than squeezing the lettering.

`kind` accepts `pdf`, `doc`, `xls`, `csv`, `ppt`, `txt`, `image`, `json`, `xml`, `zip`, `generic`, `folder`, and `folder-open`. The filename helper normalizes extension case and uses the final filename segment. Extensionless names, dotfiles, and unfamiliar extensions return `generic`. It does not inspect file content or parse URLs.

**ASSET-FILE-03:** The resolver follows the extension lists printed beneath the Figma component sets:

| Kind           | Extensions                           |
| -------------- | ------------------------------------ |
| PDF            | pdf                                  |
| Document       | docx, doc, rtf, odt                  |
| Spreadsheet    | xlsx, xls, xlsm, ods                 |
| Delimited data | csv, tsv                             |
| Presentation   | pptx, ppt, key                       |
| Text           | txt, md, log                         |
| Image          | png, jpg, jpeg, gif, svg, webp, heic |
| JSON           | json                                 |
| XML            | xml, html                            |
| Archive        | zip, rar, 7z, tar, gz                |

The source component descriptions are empty; the visible gallery annotations carry these rules. Full text and source IDs are retained in `figma-guidance.json`.
