The Principal Dev – Masterclass for Tech Leads

The Principal Dev – Masterclass for Tech LeadsNov 27-28

Join

Iconify is the most versatile icon framework.

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?

Other repositories you might want to look at:

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.

Types of components

There are currently 2 types of components:

Why is API needed?

API is needed to load data for icons that you use.

For Iconify icon components, this means you don't need to worry about bundling all possible icons during development, component will load icons that are rendered.

For CSS icon components, this means fallback SVGs for Safari browser will be loaded only for users that use Safari browser (components check for feature support, not browser id), so you can move path data to CSS without worrying about visitors with old browsers.

You can also use API if you don't know what icons user will need, while offering thousands of icons to choose from. This is perfect for applications that can be customised by user.

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:

Packages used by Iconify icon components:

Packages used by Iconify CSS icon components, will also be used in future by new versions of Iconify icon components:

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:

Demo

Directory iconify-icon-demo contains demo packages that show usage of iconify-icon web component.

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:

export default defineNuxtConfig({
	vue: {
		compilerOptions: {
			isCustomElement: (tag) => tag === 'iconify-icon',
		},
	},
});

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

Iconify CSS icon components

Directory components-css contains native components for several frameworks:

Package Usage
React component React
Vue component Vue
Svelte component Svelte

Unlike Iconify icon components, these components are intended to be used for rendering SVG + CSS, loading icon data from API only as a fallback option for Safari users.

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:

Packages that have been deprecated, removed from this repository and are no longer maintained:

Packages that are still available, but should be avoided:

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.

Plugins

Directory plugins contains Tailwind CSS plugin for Tailwind CSS 3.

For Tailwind CSS 4, plugin has been rewritten and moved to a separate repository.

Demo

Directory plugins-demo contains demo packages that show usage of plugins.

Installation, debugging and contributing

See CONTRIBUTING.md.

Sponsors

Documentation

Documentation for all packages is available on Iconify documentation website:

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

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.