Skip to content

FileIcon

FileIcon(__namedParameters): Element

Defined in: react/components/media/file-icon.tsx:47

Automatically resolves and renders the VS Code Seti file icon.

Resolution priority: filename → extension → languageId → default. The Seti theme color is applied automatically; override with style={{ color: "..." }}.

Icons are loaded lazily — the WOFF font is parsed only on the first icon that actually needs it, and each glyph is extracted individually on demand.

FileIconProps

Element

// By extension:
<FileIcon extension="ts" />
<FileIcon extension="json" />
// By filename (picks up special icons: package.json, Dockerfile, Makefile…):
<FileIcon filename="package.json" />
<FileIcon filename="Dockerfile" />
// Folder icon:
<FileIcon isFolder />
// Override color:
<FileIcon extension="py" style={{ color: "#89b4fa" }} />