Universal icon framework. One syntax for FontAwesome, Material Design Icons, DashIcons, Feather Icons, EmojiOne, Noto Emoji and many other open source icon sets (over 150 icon sets and 200k icons). SVG framework, React, Vue and Svelte components!
Installations
npm install @iconify/types
Releases
Unable to fetch releases
Developer
Developer Guide
Module System
ESM
Min. Node Version
Typescript Support
Yes
Node Version
16.15.1
NPM Version
8.11.0
Statistics
4,654 Stars
976 Commits
132 Forks
22 Watching
10 Branches
24 Contributors
Updated on 28 Nov 2024
Languages
TypeScript (84.99%)
JavaScript (4.5%)
Svelte (3.76%)
Vue (3.36%)
HTML (2.12%)
CSS (1.19%)
Dockerfile (0.09%)
Total Downloads
Cumulative downloads
Total Downloads
44,399,424
Last day
-2.7%
170,190
Compared to previous day
Last week
3.5%
965,296
Compared to previous week
Last month
14.9%
3,888,854
Compared to previous month
Last year
147.9%
29,646,402
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
1
Iconify is the most versatile icon framework.
- Unified icon framework that can be used with any icon library.
- Out of the box includes 150+ icon sets with more than 200,000 icons.
- Embed icons in HTML with Iconify Icon web component or components for front-end frameworks.
- Embed icons in designs with plug-ins for Figma, Sketch and Adobe XD.
- Add icon search to your applications with Iconify Icon Finder.
For more information visit https://iconify.design/.
Iconify parts
There are several parts of project, some are in this repository, some are in other repositories.
What is included in this repository?
- Directory
packages
contains main reusable packages: types, utilities, reusable functions used by various components. - Directory
iconify-icon
containsiconify-icon
web component that renders icons. It also contains wrappers for various frameworks that cannot handle web components. - Directory
components
contains older version of icon components that are native to various frameworks, which do not use web component. - Directory
plugins
contains plugins for various frameworks, which generate icons.
Other repositories you might want to look at:
- Data for all icons is available in
iconify/icon-sets
repository. - Tools for parsing icons and generating icon sets are available in
iconify/tools
repository.
Iconify icon components
Main packages in this repository are various icon components.
Why are those icon components needed? Iconify icon components are not just yet another set of icon components. Unlike other icon components, Iconify icon components do not include icon data. Instead, icon data is loaded on demand from Iconify API.
Iconify API provides data for over 200,000 open source icons! API is hosted on publicly available servers, spread out geographically to make sure visitors from all over the world have the fastest possible connection with redundancies in place to make sure it is always online.
Why is API needed?
When you use an icon font, each visitor loads an entire font, even if your page only uses a few icons. This is a major downside of using icon fonts. That limits developers to one or two fonts or icon sets.
If you are using typical icon set that is not a font, you still need to bundle all icons used in your application, even ones that visitor does not need.
Unlike icon fonts and components for various icon sets, Iconify icon components dynamically load icon data from Iconify API whenever it is needed.
This makes it possible to have an unlimited choice of icons!
Packages in this repository
There are several types of packages, split in their own directories.
Main packages
Directory packages
contains main packages that are reusable by all other packages in this repository as well as third party components.
Main packages:
- Iconify types - TypeScript types.
- Iconify utils - common files used by various Iconify projects (including tools, API, etc...).
- Iconify core - common files used by icon components and plugins.
- API redundancy - library for managing redundancies for loading data from API: handling timeouts, rotating hosts. It provides fallback for loading icons if main API host is unreachable.
Web component
Directory iconify-icon
contains iconify-icon
web component and wrappers for various frameworks.
Package | Usage |
---|---|
Web component | Everywhere |
React wrapper | React |
SolidJS wrapper | SolidJS |
Frameworks that are confirmed to work with web components without custom wrappers:
- Svelte.
- Lit.
- Ember.
- Vue 2 and Vue 3, but requires custom config when used in Nuxt (see below).
- React, but with small differences, such as using
class
instead ofclassName
. Wrapper fixes it and provides types.
Demo
Directory iconify-icon-demo
contains demo packages that show usage of iconify-icon
web component.
- React demo - demo using web component with React. Run
npm run dev
to start demo. - Next.js demo - demo for web component with Next.js. Run
npm run dev
to start demo. - Svelte demo with Vite - demo for web component with Svelte using Vite. Run
npm run dev
to start demo. - SvelteKit demo - demo for web component with SvelteKit. Run
npm run dev
to start the demo. - Vue 3 demo - demo for web component with Vue 3. Run
npm run dev
to start demo. - Nuxt 3 demo - demo for web component with Nuxt 3. Run
npm run dev
to start demo. Requires custom config, see below. - Vue 2 demo - demo for web component with Vue 2. Run
npm run build
to build demo andnpm run serve
to start it. - SolidJS demo - demo using web component with SolidJS. Run
npm run dev
to start demo. - Lit demo - demo for web component with Lit. Run
npm run start
to start demo.
Nuxt 3 usage
When using web component with Nuxt 3, you need to tell Nuxt that iconify-icon
is a custom element. Otherwise it will show few warnings in dev mode.
Example nuxt.config.ts
:
1export default defineNuxtConfig({ 2 vue: { 3 compilerOptions: { 4 isCustomElement: (tag) => tag === 'iconify-icon', 5 }, 6 }, 7});
This configuration change is not needed when using Vue with @vitejs/plugin-vue
.
Iconify icon components
Directory components
contains native components for several frameworks:
Package | Usage |
---|---|
React component | React |
Vue component | Vue |
Svelte component | Svelte |
Deprecation notice
Components in directory components
are slowly phased out in favor of iconify-icon
web component. Components are still maintained and supported, but it is better to switch to web component.
Functionality is identical, but web component has some advantages:
- No framework specific shenanigans. Events and attributes are supported for all frameworks.
- Works better with SSR (icon is rendered only in browser, but because icon is contained in shadow DOM, it does not cause hydration problems).
- Better interoperability. All parts of applicaiton reuse same web component, even if those parts are written in different frameworks.
Deprecation status:
- SVG Framework: can be replaced with
iconify-icon
. - React component: can be replaced with
iconify-icon
using@iconify-icon/react
wrapper. - Svelte component: can be replaced with
iconify-icon
, does not require Svelte specific wrapper. - Vue 3 component: can be replaced with
iconify-icon
, does not require Vue specific wrapper. - Vue 2 component: can be replaced with
iconify-icon
, does not require Vue specific wrapper. Make sure you are not using Webpack older than version 5. - Ember component: can be replaced with
iconify-icon
, does not require Ember specific wrapper.
To import web component, just import it once in your script, as per iconify-icon
README file.
Demo
Directory components-demo
contains demo packages that show usage of icon components.
- React demo - demo for React component. Run
npm run dev
to start demo. - Next.js demo - demo for React component with Next.js. Run
npm run dev
to start demo. - Vue demo - demo for Vue component. Run
npm run dev
to start demo. - Nuxt demo - demo for Vue component with Nuxt. Run
npm run dev
to start demo. - Svelte demo with Vite - demo for Svelte component using Vite. Run
npm run dev
to start demo. - SvelteKit demo - demo for SvelteKit, using Svelte component on the server and in the browser. Run
npm run dev
to start the demo.
Plugins
Directory plugins
contains plugins.
Package | Usage |
---|---|
Tailwind CSS plugin | Tailwind CSS |
Demo
Directory plugins-demo
contains demo packages that show usage of plugins.
- Tailwind demo - demo for Tailwind CSS plugin. Run
npm run build
to build demo, opensrc/index.html
in browser to see result.
Installation, debugging and contributing
See CONTRIBUTING.md.
Sponsors
Documentation
Documentation for all packages is available on Iconify documentation website:
- Types documentation.
- Utilities documentation.
- Icon components documentation.
- Tailwind CSS plugin documentation.
Licence
Iconify is licensed under MIT license.
SPDX-License-Identifier: MIT
Some packages of this monorepo in previous versions were dual-licensed under Apache 2.0 and GPL 2.0 licence, which was messy and confusing. This was later changed to MIT for simplicity.
This licence does not apply to icons. Icons are released under different licences, see each icon set for details. Icons available by default are all licensed under various open-source licences.
© 2020-PRESENT Vjacheslav Trushkin
No vulnerabilities found.
Reason
0 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: license.txt:0
- Info: FSF or OSI recognized license: MIT License: license.txt:0
Reason
Found 3/26 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: containerImage not pinned by hash: .devcontainer/Dockerfile:5
- Info: 0 out of 1 containerImage dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 7 are checked with a SAST tool
Reason
39 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-mv48-hcvh-8jj8
- Warn: Project is vulnerable to: GHSA-353f-5xf4-qw67
- Warn: Project is vulnerable to: GHSA-c24v-8rfc-w8vw
- Warn: Project is vulnerable to: GHSA-8jhw-289h-jh2g
- Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-28mc-g557-92m7
- Warn: Project is vulnerable to: GHSA-5p75-vc5g-8rv2
- Warn: Project is vulnerable to: GHSA-gv7g-x59x-wf8f
- Warn: Project is vulnerable to: GHSA-mh2x-fcqh-fmqv
- Warn: Project is vulnerable to: GHSA-rjjv-87mx-6x3h
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-gp8f-8m3g-qvj9
- Warn: Project is vulnerable to: GHSA-fr5h-rqp8-mj6g
- Warn: Project is vulnerable to: GHSA-g77x-44xx-532m
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-8266-84wp-wv5c
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-5r9g-qh6m-jxff
- Warn: Project is vulnerable to: GHSA-r6ch-mqf9-qc9w
- Warn: Project is vulnerable to: GHSA-wqq4-5wpv-mx2g
- Warn: Project is vulnerable to: GHSA-3787-6prv-h9w3
- Warn: Project is vulnerable to: GHSA-9qxr-qj54-h672
- Warn: Project is vulnerable to: GHSA-m4v8-wqvr-p9f7
Score
2.9
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More