PHPackages                             websemantics/file-icons - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. websemantics/file-icons

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

websemantics/file-icons
=======================

File specific icons for PHP. A port of Atom File-icons, https://github.com/file-icons/atom

1.0.1(9y ago)42363MITPHPPHP &gt;=5.3.0

Since Mar 26Pushed 6y ago2 watchersCompare

[ Source](https://github.com/websemantics/file-icons)[ Packagist](https://packagist.org/packages/websemantics/file-icons)[ Docs](https://github.com/websemantics/file-icons)[ RSS](/packages/websemantics-file-icons/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

```
╭──────┬─╮                       ╭─────╮
│        │                       │     │
│      ╭─╯╭───╮╭───╮ ╭──────╮    ├─────┤╭──────╮╭──────╮╭────┬─╮╭──────╮
│      ╰─╮├───┤│   │ │  ──  │    │     ││   ╭──╯│   ╭╮ ││      ││  ────┤
│      ╭─╯│   ││   │ │      │    │     ││   ╰──╮│   ││ ││   ╭╮ ││      │
│      │  │   ││   │ │  ────┤    │     ││      ││   ╰╯ ││   ││ │├────  │
╰──────╯  ╰───╯╰───╯ ╰──────╯    ╰─────╯╰──────╯╰──────╯╰───╯╰─╯╰──────╯
╭─╮ ╭─╮ ┬─╮    ╭─╮ ┬ ┬ ╭─╮   ╭─╮ ╭─╮ ╭─╮ ┬   ┬ ╭─╮ ╭─╮ ╭┬╮ ┬ ╭─╮ ╭╮╭ ╭─╮
├┤  │ │ ├┬╯    ├─╯ ├─┤ ├─╯   ├─┤ ├─╯ ├─╯ │   │ │   ├─┤  │  │ │ │ │││ ╰─╮
┴   ╰─╯ ┴╰─    ┴   ┴ ┴ ┴     ┴ ┴ ┴   ┴   ┴─╯ ┴ ╰─╯ ┴ ┴  ┴  ┴ ╰─╯ ╯╰╯ ╰─╯

```

> File specific icons for PHP. A port of Atom File-icons,

[![Icon previews](https://raw.githubusercontent.com/file-icons/atom/6714706f268e257100e03c9eb52819cb97ad570b/preview.png)](https://raw.githubusercontent.com/file-icons/atom/6714706f268e257100e03c9eb52819cb97ad570b/preview.png)

Install
-------

[](#install)

1- Use `Composer` to install as follows,

```
composer require websemantics/file-icons
```

Getting Started
---------------

[](#getting-started)

Create an instance of `FileIcons` class.

```
use Websemantics\FileIcons\FileIcons;

$icons = new FileIcons();
```

Include `css` styles in the header of an html document. This will generate a `link` tag that points to the package stylesheet.

```
FileIcons::includeCss();
```

Get the class name of the icon that represent a filename, for example `text-icon`.

```
$filename = 'src/index.php';
$class_name = $icons->getClass($filename);
```

You can also get a class name of the associated icon color.

```
$filename = 'README.md';
$class_name = $icons->getClassWithColor($filename);
```

Use the class name to generate html, for example

```
echo "$filename";
```

Check out - [Markdown Browser Plus](https://github.com/websemantics/markdown-browser-plus) to see implementation details.

Resources
---------

[](#resources)

- [Atom File Icons](https://github.com/file-icons/atom), file specific icons for improved visual grepping.
- [Markdown Browser Plus](https://github.com/websemantics/markdown-browser-plus), Github flavoured, local file browser for viewing markdown documentation files.

Support
-------

[](#support)

Need help or have a question? post at [StackOverflow](https://stackoverflow.com/questions/tagged/file-icons+websemantics).

*Please don't use the issue trackers for support/questions.*

*Star if you find this project useful, to show support or simply for being awesome :)*

Contribution
------------

[](#contribution)

Contributions to this project are accepted in the form of feedback, bugs reports and even better - pull requests.

License
-------

[](#license)

[MIT license](http://opensource.org/licenses/mit-license.php) Copyright (c) Web Semantics, Inc.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3384d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0cfed068d359c1d9532498c807304a191d59e0aca0e735ccb0c3b7ae99992ed0?d=identicon)[websemantics](/maintainers/websemantics)

---

Top Contributors

[![websemantics](https://avatars.githubusercontent.com/u/2190455?v=4)](https://github.com/websemantics "websemantics (9 commits)")

---

Tags

deviconsfontawesomeiconsmfizzocticonsphpphpiconsFontAwesomeocticonsMfizzdevicons

### Embed Badge

![Health badge](/badges/websemantics-file-icons/health.svg)

```
[![Health](https://phpackages.com/badges/websemantics-file-icons/health.svg)](https://phpackages.com/packages/websemantics-file-icons)
```

###  Alternatives

[swissup/module-font-awesome

FontAwesome for Magento2

117.1k1](/packages/swissup-module-font-awesome)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
