Iconify Tools is a set of reusable functions for importing, exporting and parsing icons.
Library is written in TypeScript, is available as ES modules for modern development and CommonJS for older scripts.
To install library run:
npm install @iconify/tools --save
In Iconify Tools all functions for parsing icons work with 2 main classes:
- represents one icon. This class is used when icon's elements need to be manipulated.
- represents an icon set with easy to use functions for managing icons.
To start working with icon set, you can either create blank icon set or import icon set from some source.
Documentation from importing icons:
Cleaning up and validating icons is the first thing you should do after importing icons if icons come from:
- Image editing software. Often software leave a lot of junk code in icons, which must be removed.
- Third party. You need to make sure icons do not contain scripts, events.
Iconify Tools offer several functions for manipulating icons. You can:
- Check or change color palette.
- Optimise icon.
- Fix elements to support old software.
See icon manipulation functions for list of available functions.
After manipulating icons, you can export icon set to various formats.
Documentation from exporting icons:
In addition to managing icons, Iconify Tools has several functions to manage packages and repositories: