2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-12 13:47:49 +00:00
Go to file
2022-04-29 22:59:34 +03:00
.github Add GitHub Sponsors 2021-01-09 18:23:40 +02:00
.vscode Add VSCode settings 2022-01-28 12:36:46 +02:00
demo vue: add rendering modes 2022-04-15 09:58:43 +03:00
monorepo Sync local dependencies, script to automatically update version numbers 2022-03-31 15:59:42 +03:00
packages Remove getIconFromStorage, change getIconData to return null if icon is marked as missing 2022-04-29 22:59:34 +03:00
.editorconfig Move version 2 to a big monorepo 2020-04-28 12:47:35 +03:00
.gitignore Add VSCode settings 2022-01-28 12:36:46 +02:00
.prettierrc Move version 2 to a big monorepo 2020-04-28 12:47:35 +03:00
lerna.json Remove library-builder package, use unbuild instead 2022-03-15 19:19:51 +02:00
license.txt Add license files to packages that do not have them 2021-11-15 17:28:55 +02:00
package-lock.json Reorganize monorepo helpers, support multiple actions 2022-01-28 11:24:29 +02:00
package.json Sync local dependencies, script to automatically update version numbers 2022-03-31 15:59:42 +03:00
README.md Rewrite SVG framework with new unit tests, better attribute watching, cleaner render 2022-04-07 15:52:57 +03:00

What is Iconify?

Iconify is the most versatile icon framework.

  • Unified icon framework that can be used with any icon library.
  • Out of the box includes 100+ icon sets with more than 100,000 icons.
  • Embed icons in HTML with SVG framework 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 version 1

If you are looking for Iconify version 1, check out https://github.com/iconify/iconify/tree/iconify1

This repository contains the new version, completely rewritten using modern development process.

Iconify monorepo

This repository is a big monorepo that contains several icon components for various frameworks and several packages that are reused by all those components.

Iconify icon components

Iconify icon components are not just yet another set of icon components. Unlike other icon components, Iconify icon components do not include icon data. They load icon data on demand from Iconify API.

Iconify API provides data for over 100,000 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!

Available packages

There are several Iconify components included in this repository:

Implementation Usage
SVG Framework HTML
React component React, Next.js
Vue 3 component Vue 3
Vue 2 component Vue 2
Svelte component Svelte, SvelteKit, Sapper
Ember component Ember

Other packages:

  • Iconify types - TypeScript types.
  • Iconify utils - common files used by various Iconify projects (including tools, API, etc...).
  • Iconify core - common files used by various components.
  • API redundancy - library for managing redundancies for loading data from API: handling timeouts, rotating hosts.
  • React demo - demo for React component. Run npm start to start demo.
  • Next.js demo - demo for React component with Next.js. Run npm run build to build it and npm start to start demo.
  • Vue 3 demo - demo for Vue component. Run npm run dev to start demo.
  • Vue 2 demo - demo for Vue component. Run npm run dev to start demo.
  • Svelte demo - demo for Svelte component. Run npm run dev to start demo.
  • Svelte demo with Vite - demo for Svelte component using Vite. Run npm run dev to start demo.
  • Sapper demo - demo for Sapper, using Svelte component on the server and in the browser. Run npm run dev to start the demo (deprecated, use SvelteKit instead of Sapper).
  • SvelteKit demo - demo for SvelteKit, using Svelte component on the server and in the browser. Run npm run dev to start the demo.
  • Ember demo - demo for Ember component. Run npm run start to start demo.

Installation

This monorepo used Lerna to manage packages, but due to several bugs in Lerna and Lerna development being abandoned, it was replaced with custom manager.

To install dependencies in all packages, run

npm install

This will install all dependencies and create symbolic links to packages.

If links stop working for some reason, run npm run link to fix links.

If you want to remove node_modules for all packages, run npm run clean.

If you want to re-install dependencies, run npm run reinstall.

To build everything, run npm run build (this excludes demo packages).

To run tests, run npm run test (this excludes demo packages).

Other commands

You can run any commands on any package from that package's directory.

Commands that modify node_modules might break symlinks. To fix it, run npm run link from monorepo directory.

Commands for all packages

If you want to run a command on all packages, run node monorepo run your_command --if-present.

There are several options to filter packages, see monorepo/README.md.

Monorepo on Windows

This monorepo uses symbolic links to create links between packages. This allows development of multiple packages at the same time.

When using Windows, symbolic links require setting up extra permissions. If you are using Windows and cannot set permissions for symbolic links, there are several options:

  • Use Windows Subsystem for Linux (WSL).
  • Treat each package as a separate package, without links to other packages. All packages do have correct dependencies, so you will be able to use most packages, but you will not be able to work on multiple packages at the same time.

Documentation

Documentation for all packages is available on Iconify documentation website:

Licence

Iconify is dual-licensed under Apache 2.0 and GPL 2.0 licence. You may select, at your option, one of the above-listed licences.

SPDX-License-Identifier: Apache-2.0 OR GPL-2.0

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 some kind of open-source or free licence.

© 2020, 2021 Iconify OÜ