All Projects → websemantics → file-icons-js

websemantics / file-icons-js

Licence: MIT license
File specific icons for Javascript. A port of Atom File-icons (see https://github.com/file-icons/atom)

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to file-icons-js

Styled Icons
💅 Popular icon packs like Font Awesome, Material Design, and Octicons, available as React Styled Components
Stars: ✭ 1,878 (+2371.05%)
Mutual labels:  octicons
Nerd Fonts
Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
Stars: ✭ 31,778 (+41713.16%)
Mutual labels:  octicons
Octicons
A scalable set of icons handcrafted with <3 by GitHub
Stars: ✭ 7,039 (+9161.84%)
Mutual labels:  octicons
nerd-font-cheatsheets
Generated list of Nerd Font to simplify finding characters that look good in text editors and terminal prompt
Stars: ✭ 74 (-2.63%)
Mutual labels:  octicons
octicons-modular
GitHub Octicons with tree-shaking support and icon-per-file style.
Stars: ✭ 25 (-67.11%)
Mutual labels:  octicons
vscode-icon-fonts
Snippets for popular icon fonts such as Font Awesome, Ionicons, Glyphicons, Octicons, Material Design Icons and many more!
Stars: ✭ 33 (-56.58%)
Mutual labels:  octicons
react-octicon
A GitHub Octicons icon React component
Stars: ✭ 76 (+0%)
Mutual labels:  octicons
octicons-png
Keynote hates SVGs, convert SVGs to PNGS
Stars: ✭ 25 (-67.11%)
Mutual labels:  octicons
ranger-devicons2
No description or website provided.
Stars: ✭ 21 (-72.37%)
Mutual labels:  devicons
╭───────╮                    ╭────╮
│    ╭──╯╭───╮╭───╮╭──────╮  ├────┤╭──────╮╭──────╮╭────┬─╮╭──────╮
│    ╰──╮├───┤│   ││  ──  │  │    ││   ╭──╯│   ╭╮ ││      ││  ────┤
│    ╭──╯│   ││   ││      │  │    ││   ╰──╮│   ││ ││   ╭╮ ││      │
│    │   │   ││   ││  ────┤  │    ││      ││   ╰╯ ││   ││ │├────  │
╰────╯   ╰───╯╰───╯╰──────╯  ╰────╯╰──────╯╰──────╯╰───╯╰─╯╰──────╯
╭─╮  ╭─╮  ┬─╮         ┬  ╭─╮  ┬  ┬  ╭─╮  ╭─╮  ╭─╮  ┬─╮  ┬  ╭─╮  ╭┬╮
├┤   │ │  ├┬╯         │  ├─┤  ╰╮╭╯  ├─┤  ╰─╮  │    ├┬╯  │  ├─╯   │
┴    ╰─╯  ┴╰─       ╰─╯  ┴ ┴   ╰╯   ┴ ┴  ╰─╯  ╰─╯  ┴╰─  ┴  ┴     ┴

File specific icons for the browser from Atom File-icons, https://github.com/file-icons/atom

Hyperapp demo

Icon previews

Install

Use npm to install as follows,

npm i websemantics/file-icons-js

Or, Bower,

bower i websemantics/file-icons-js

Getting Started

Include css styles from css/style.css in the header of an html document.

Get an instance of FileIcons class,

var icons = window.FileIcons;

Get the class name of the icon that represent a filename (for example text-icon),

var filename = 'src/app.js';
var class_name = icons.getClass(filename);

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

var  filename = 'README.md';
var class_name = icons.getClassWithColor(filename);

Use the class name to generate html, for example,

document.body.innerHTML = "<a><i class=" + class_name + "></i>$filename</a>";

Resources

Support

Need help or have a question? post at StackOverflow.

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

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

License

MIT license Copyright (c) Web Semantics, Inc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].