🍱 Simple nodejs support for using icons!

Overview

🍱 node-icons

All Contributors License Last Commit Stars Forks

Usage

Checkout its unit tests to see complete usage with output!

import Icons from "node-icons";
const icons = Icons({
  // auto installs the collection set of an icon if not already installed
  installPkg: true,
  alias: new Map(),
  prefix: "lucide",
  separator: ":",
});
const result = await icons.iconify("This is cool right! ::activity::", {
  // The `styles` object's key value pair are appended as attributes to the svg
  styles: {
    width: 100,
    color: `"red"`, // it is important to have quotes for those values which need them like color="red"
  },
  base64: false,
});

The Icon({}) function expects an object of type config. The object returned by it has 2 methods

type returnVal = {
  getIcons(iconName: any, styles: any, base64: boolean): Promise<string>;
  getIconsSync(iconName: any, styles: any, base64: boolean): string;
  iconify(
    text: string,
    options: {
      styles: object;
      base64: boolean;
    },
    regex?: RegExp,
  ): Promise<string>;
};

With getIconsSync, auto installing icons is not possible.

Installation

npm i node-icons or yarn add node-icons to install.

npm i @iconify/json to install all icons or npm i @iconify-json/<collection-id> to install a specific icon set.

🎉 Contributing

Contributions are welcome! Whether it is a small documentation change or a breaking feature, we welcome it!

Please note: All contributions are taken under the MIT license

👥 Contributors

You might also like...

Transform your icons with trendy animations.

iconate.js A call to transform your existing icons in a cool trendy way iconate.js is a tiny performant library for cross-browser icon transformation

Dec 27, 2022

SVG icons for popular brands

Simple Icons Over 2200 Free SVG icons for popular brands. See them all on one page at SimpleIcons.org. Contributions, corrections & requests can be ma

Jan 1, 2023

jQueryFileExplorer Inspired by jQueryFiletree. Most of the icons in the images folder are from jQueryFiletree.

 jQueryFileExplorer  Inspired by jQueryFiletree. Most of the icons in the images folder are from jQueryFiletree.

jQueryFileExplorer Inspired by jQueryFiletree. Most of the icons in the images folder are from jQueryFiletree. Split.js is included and used to provid

Oct 28, 2022

Basic styling to create calendar icons with pure HTML and CSS

Calendar Icon Basic styling to create calendar icons with pure HTML and CSS Usage Embed the CSS, and markup your date: link type="text/css" rel="styl

Aug 23, 2022

CSS sprite to represent iOS shortcut icons

shortcut-icons A CSS sprite to represent iOS shortcut icons. Grab the stylesheet and the default (iOS 15) glyph set, and add a shortcut icon to your H

Nov 14, 2022

Pure CSS icons for popular file extensions

Pure CSS icons for popular file extensions

CSS file icons Pure CSS file icons for popular extensions lightweight css library Icons Demo Usage Include css-file-icons.css to html or install via n

Dec 6, 2022

Iconpicker for Bootstrap 5 icons

Iconpicker for Bootstrap 5 Usage 1 - Via cdn script src="https://unpkg.com/[email protected]/dist/iconpicker.js"/script 2 - Via npm npm

Dec 7, 2022

Icons for links. Logseq Plugin

Icons for links. Logseq Plugin

"Awesome Links" plugin for Logseq Favicons for external links! 🡖 Pages icons for internal links 🡖 Page iconsicon::extended from Emoji to hundreds ic

Dec 21, 2022

A website for tracking community support for BIP21 QR codes that support on-chain and lightning bitcoin payments.

BIP21 Microsite This is a WIP microsite to promote the usage of a BIP21 payment URI QR code that can include lightning invoices or offers. Wallet supp

Nov 27, 2022
Comments
  • Bump @types/node from 16.11.17 to 17.0.5

    Bump @types/node from 16.11.17 to 17.0.5

    Bumps @types/node from 16.11.17 to 17.0.5.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @commitlint/config-conventional from 15.0.0 to 16.0.0

    Bump @commitlint/config-conventional from 15.0.0 to 16.0.0

    Bumps @commitlint/config-conventional from 15.0.0 to 16.0.0.

    Release notes

    Sourced from @​commitlint/config-conventional's releases.

    v16.0.0

    16.0.0 (2021-12-26)

    Bug Fixes

    • is-ignored: ignore merge tag commit messages (#2920) (914782a)
    • update dependency @​types/tmp to v0.2.2 (#2903) (d2f146c)
    • update dependency conventional-commits-parser to v3.2.3 (#2904) (3a98d3c)
    • cz-commitlint: combine commit body with issuesBody/breakingBody when body has an empty string (#2915) (a038b41)
    • docs: minor changes to guides (#2913) (499efd1)
    • update dependency conventional-changelog-conventionalcommits to v4.6.1 (#2906) (1d1ccfa)
    • update dependency cosmiconfig to v7.0.1 (#2905) (2c33c98)
    • update dependency jest-environment-node to v27.4.2 (#2907) (c3b29ba)
    • update dependency yargs to v17.3.0 (#2908) (a387494)

    Features

    • config-rush-scopes: add config for rush monorepo (#2878) (befa677)
    • cz-commitlint: support select scope with radio list by setting disableMultipleScopes (#2911) (9d8d73f), closes #2782
    • config validation (#2412) (c717202), closes #327

    BREAKING CHANGES

    • cz-commitlint: users who is using multiple scopes need to set enableMultipleScopes to true

    New Contributors

    Full Changelog: https://github.com/conventional-changelog/commitlint/compare/v15.0.0...v16.0.0

    Changelog

    Sourced from @​commitlint/config-conventional's changelog.

    16.0.0 (2021-12-26)

    Note: Version bump only for package @​commitlint/config-conventional

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @commitlint/cli from 15.0.0 to 16.0.0

    Bump @commitlint/cli from 15.0.0 to 16.0.0

    Bumps @commitlint/cli from 15.0.0 to 16.0.0.

    Release notes

    Sourced from @​commitlint/cli's releases.

    v16.0.0

    16.0.0 (2021-12-26)

    Bug Fixes

    • is-ignored: ignore merge tag commit messages (#2920) (914782a)
    • update dependency @​types/tmp to v0.2.2 (#2903) (d2f146c)
    • update dependency conventional-commits-parser to v3.2.3 (#2904) (3a98d3c)
    • cz-commitlint: combine commit body with issuesBody/breakingBody when body has an empty string (#2915) (a038b41)
    • docs: minor changes to guides (#2913) (499efd1)
    • update dependency conventional-changelog-conventionalcommits to v4.6.1 (#2906) (1d1ccfa)
    • update dependency cosmiconfig to v7.0.1 (#2905) (2c33c98)
    • update dependency jest-environment-node to v27.4.2 (#2907) (c3b29ba)
    • update dependency yargs to v17.3.0 (#2908) (a387494)

    Features

    • config-rush-scopes: add config for rush monorepo (#2878) (befa677)
    • cz-commitlint: support select scope with radio list by setting disableMultipleScopes (#2911) (9d8d73f), closes #2782
    • config validation (#2412) (c717202), closes #327

    BREAKING CHANGES

    • cz-commitlint: users who is using multiple scopes need to set enableMultipleScopes to true

    New Contributors

    Full Changelog: https://github.com/conventional-changelog/commitlint/compare/v15.0.0...v16.0.0

    Changelog

    Sourced from @​commitlint/cli's changelog.

    16.0.0 (2021-12-26)

    Features

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
Owner
(TS/JS).Gandalf(he/him)
Student by day and TS Wizard by night, and an all time JS evangelist. Member of @hackclub
(TS/JS).Gandalf(he/him)
Several custom made and legacy icons, and icons collected all over the internet in 1 set, UI selectable.

Custom icon library Several custom made and legacy icons, and icons collected all over the internet in 1 set, UI selectable. Upon each Material Design

Marius 12 Dec 12, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Query for CSS brower support data, combined from caniuse and MDN, including version support started and global support percentages.

css-browser-support Query for CSS browser support data, combined from caniuse and MDN, including version support started and global support percentage

Stephanie Eckles 65 Nov 2, 2022
A library of icons rendered purely in CSS and compiled using SASS.

Welcome to PureIcons.css: This is a library of icons rendered purely in CSS and compiled using SASSs. It is currently at 79 icons. More will be added

William Troup 2 Apr 27, 2021
Cloud function to generate basic icons, splash screens, and favicons.

Example: https://icogen.vercel.app/api/icon?color=white&padding=300&icon_id=1f1f1-1f1fa Can be used in Expo apps via app.json: { "expo": { "icon

Evan Bacon 13 Jan 2, 2023
You only need 5 icons to meet most needs!

pwa-icons-generator You only need 5 icons to meet most needs! Don't believe me? Check out this awesome article written by the author of PostCSS and Au

Евгений Епифанов 21 Aug 8, 2022
Add icons to the AtCoder standings table according to ratings.

ac-rating-icon AtCoder のコンテスト順位表に、レーティングに対応したアイコンを追加するユーザースクリプトです。 アイデア元: https://twitter.com/e869120/status/1519310341024677888 灰色の細分化について 内部レート 0 以上

subaru 5 May 6, 2022
🚀 Hero Icons for Flutjs

FLUT-HERO ⚔ Hero Icons for Flutjs Welcome! this package contains a set of icons widgets for Flutjs framework. All the svg source where made by the awe

Filipe Lukebana 2 Jun 16, 2022