# @types/react-file-icon

> TypeScript definitions for react-file-icon

Latest version **1.0.5** (published 2026-04-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-file-icon
pnpm add @types/react-file-icon
yarn add @types/react-file-icon
bun add @types/react-file-icon
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2026-04-02 |
| First published | 2020-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-file-icon
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-file-icon
- npm.io page: https://npm.io/package/@types/react-file-icon

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 1.0.5 (latest) — 2026-04-02
- 1.0.4 (ts4.5) — 2023-11-07
- 1.0.1 (ts3.6) — 2021-07-08
- 1.0.0 (ts3.0) — 2020-07-06
- 1.0.3 — 2023-10-18
- 1.0.2 — 2023-09-27

## README

# Installation
> `npm install --save @types/react-file-icon`

# Summary
This package contains type definitions for react-file-icon (https://github.com/pixelunion/react-file-icon#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-file-icon.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-file-icon/index.d.ts)
````ts
import * as React from "react";

export type IconType =
    | "3d"
    | "acrobat"
    | "android"
    | "audio"
    | "binary"
    | "code"
    | "code2"
    | "compressed"
    | "document"
    | "drive"
    | "font"
    | "image"
    | "presentation"
    | "settings"
    | "spreadsheet"
    | "vector"
    | "video";

export interface FileIconProps {
    color?: string | undefined;
    extension?: string | undefined;
    fold?: boolean | undefined;
    foldColor?: string | undefined;
    glyphColor?: string | undefined;
    gradientColor?: string | undefined;
    gradientOpacity?: number | undefined;
    labelColor?: string | undefined;
    labelTextColor?: string | undefined;
    labelTextStyle?: object | undefined;
    labelUppercase?: boolean | undefined;
    radius?: number | undefined;
    type?: IconType | undefined;
}

export type DefaultExtensionType =
    | "3dm"
    | "3ds"
    | "3g2"
    | "3gp"
    | "7zip"
    | "aac"
    | "aep"
    | "ai"
    | "aif"
    | "aiff"
    | "asf"
    | "asp"
    | "aspx"
    | "avi"
    | "bin"
    | "bmp"
    | "c"
    | "cpp"
    | "cs"
    | "css"
    | "csv"
    | "cue"
    | "dll"
    | "dmg"
    | "doc"
    | "docx"
    | "dwg"
    | "dxf"
    | "eot"
    | "eps"
    | "exe"
    | "flac"
    | "flv"
    | "fnt"
    | "fodp"
    | "fods"
    | "fodt"
    | "fon"
    | "gif"
    | "gz"
    | "htm"
    | "html"
    | "indd"
    | "ini"
    | "java"
    | "jpeg"
    | "jpg"
    | "js"
    | "json"
    | "jsx"
    | "m4a"
    | "m4v"
    | "max"
    | "md"
    | "mid"
    | "mkv"
    | "mov"
    | "mp3"
    | "mp4"
    | "mpeg"
    | "mpg"
    | "obj"
    | "odp"
    | "ods"
    | "odt"
    | "ogg"
    | "ogv"
    | "otf"
    | "pdf"
    | "php"
    | "pkg"
    | "plist"
    | "png"
    | "ppt"
    | "pptx"
    | "pr"
    | "ps"
    | "psd"
    | "py"
    | "rar"
    | "rb"
    | "rm"
    | "rtf"
    | "scss"
    | "sitx"
    | "svg"
    | "swf"
    | "sys"
    | "tar"
    | "tex"
    | "tif"
    | "tiff"
    | "ts"
    | "ttf"
    | "txt"
    | "wav"
    | "webm"
    | "wmv"
    | "woff"
    | "wpd"
    | "wps"
    | "xlr"
    | "xls"
    | "xlsx"
    | "yml"
    | "zip"
    | "zipx";

export const defaultStyles: Record<DefaultExtensionType, Partial<FileIconProps>>;
export const FileIcon: React.FunctionComponent<FileIconProps>;

````

### Additional Details
 * Last updated: Thu, 02 Apr 2026 05:11:46 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [njuro](https://github.com/njuro).

---
_Source: https://npm.io/package/@types/react-file-icon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
