For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.0/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.0/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.0/en/components/file-type-icon.md.

File Type Icon

Provides a stable, restrained type cue in file lists and attachments while the actual filename remains the primary identifier.

Live preview
TS

Usage

<span class="file-type-icon" role="img" aria-label="TypeScript file" style="--file-color:#249bf6">
  <span data-file-extension>TS</span>
</span>

Contract

SurfaceValue
Root selector.file-type-icon
Native root<span>
Statesready, generic, known, host-provided
Events—
Methods—

Product boundary

The icon does not decide file safety, executability, or MIME truth. Brand and provider graphics remain host-owned assets supplied through the generic icon slot.

The component publishes a reusable interaction boundary only. Data fetching, persistence, permission, trusted content, and business entities remain host-owned.

Accessibility

Decorative instances use aria-hidden. Icon-only instances need a file-type name, and extension text remains readable without color recognition.