-

File Icon

PreviousNext

File-type icon rendering for uploads, datasets, workflow inputs, and knowledge resources.

Installation

pnpm dlx shadcn@latest add https://ui.zgi.ai/r/file-icon.json

Usage

import { FileIcon } from "@/components/ui/file-icon"
<FileIcon filename="agent-runtime.json" />
<FileIcon extension="csv" size="lg" />

API Reference

PropTypeDescription
filenamestringFilename used to infer the extension
extensionstringExplicit extension. Takes precedence over filename
size"sm" | "md" | "lg" | numberIcon size
mutedbooleanRender with muted foreground color