A simple Node.js library for integrating Heroicons into your vanilla Node projects with ease.
To install the package, run the following command in your project directory:
npm install heroicons-vanilla
Import the getHeroIcon function from the heroicons-vanilla package and use it to retrieve the SVG content for the desired icon.
const { getHeroIcon } = require('heroicons-vanilla');
try {
const icon = getHeroIcon('menu', 24, 'solid');
console.log(icon);
} catch (error) {
console.error(error);
}
Contributions to improve heroicons-vanilla are welcome. Feel free to fork the repository, make changes, and submit pull requests.