Description
Fantasticon is a command-line tool that turns a folder of SVG icons into a web-font icon kit. You point it at an input folder and an output folder, and it generates the font files with CSS selectors for each icon. It also generates TypeScript types and JSON maps of the generated code points, which lets you build type-safe icon components or combine the TTF file with the JSON in other platforms. Icon names are a slug of each file's folder path and base name, so icons can be grouped into namespaces. Options that the command line cannot set, such as formatOptions, pathOptions and getIconId, go in a configuration file such as .fantasticonrc.js or into the JavaScript API. The project is hosted under the twbs organisation on GitHub and its source is public.…
Highlights
- Builds icon fonts from a folder of SVG files
- Generates TypeScript types and code-point maps
- Icon names follow folder namespaces
- Configurable by file or JavaScript API
Ratings & Reviews
No ratings yet
Be the first to rate @twbs/fantasticon.
People also visit
@twbs/fantasticon FAQ
What does Fantasticon do?
It generates a web-font icon kit from SVG files, with TypeScript types and JSON maps of code points.
How do I run it?
Pass an input folder and an output folder, for example fantasticon ./icons -o dist, or keep your options in a configuration file in the working directory.
How are icon names chosen?
Each name is a slug of the file's relative path plus its base name, so an icon in a subfolder gets a namespaced name such as social-facebook.
Which options need a config file or the API?
formatOptions, pathOptions and getIconId cannot be passed on the command line, so set them in a configuration file or the JavaScript API.
Is it open source?
The source is public on GitHub under the twbs organisation. The page text does not show the license, so check the repository.
What are the best @twbs/fantasticon alternatives?
Popular alternatives to @twbs/fantasticon include fantasticon, @wkovacs64/add-icon and fontawesome. See all @twbs/fantasticon alternatives















