Description
Fantasticon is a command-line tool and JavaScript API that generates web-font icon kits from SVG files. You point it at a folder of SVGs and it outputs the font files, along with TypeScript types and JSON maps of the generated code points. The README says those outputs help you build type-safe React icon components, or combine the TTF and JSON files in mobile apps. You can run it from the command line for quick use, or add a configuration file for more control. Options such as formatOptions, pathOptions, getIconId and templates cannot be passed on the command line, so they need a configuration file or the JavaScript API. By default fantasticon looks for a configuration file in the working directory, and the --config option points it at another path. Icon names and class names are generated from a slug of each SVG file's relative path and base name, which lets you arrange icons in namespaces. The project is hosted on GitHub.…
Highlights
- Generates icon fonts from a folder of SVG files
- TypeScript types and JSON code-point maps
- Command-line tool and JavaScript API
- Configuration file for advanced options
- Namespaced icon names from folder paths
Ratings & Reviews
No ratings yet
Be the first to rate fantasticon.
People also visit
styled-icons
Icons from packs like Font Awesome, Material, Octicons, Feather, Icomoon
fantasticon FAQ
What does fantasticon do?
It generates web-font icon kits from SVG files using a command-line tool. It also outputs TypeScript types and JSON maps of code points.
Can I use it from code?
Yes. The README covers a JavaScript API with simple usage and a list of options.
Which options need a config file?
formatOptions, pathOptions, getIconId and templates cannot be passed to the CLI directly, so set them in a configuration file or through the JavaScript API.
How are icon names created?
From the relative path and file name of each SVG. A file in a social folder, for example, becomes social-facebook with the selector .icon.icon-social-facebook.
Can I use the output in mobile apps?
The README says you can combine the generated TTF and JSON files, which map icon names to code points, in mobile apps.
What are the best fantasticon alternatives?
Popular alternatives to fantasticon include @twbs/fantasticon, @wkovacs64/add-icon and fontawesome. See all fantasticon alternatives

















