All Projects → iconify → Iconify React

iconify / Iconify React

Licence: mit
Iconify icon component for React

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Iconify React

WPKirk
A WP Bones skeleton Plugin
Stars: ✭ 28 (-79.1%)
Mutual labels:  reactjs-components
React Key Handler
React component to handle keyboard events 🔑
Stars: ✭ 386 (+188.06%)
Mutual labels:  reactjs-components
Vue Theme Vscode
+200.000 installs ⬇️ Theme for Visual Studio Code inspired by Vue.js, with support for more popular languages, trying to maintain a perfect harmony of colors.
Stars: ✭ 54 (-59.7%)
Mutual labels:  reactjs-components
gbkel-portfolio
💎 My personal website that's mainly powered by Next.js, my own style guide and a lot of other technologies.
Stars: ✭ 12 (-91.04%)
Mutual labels:  reactjs-components
Eo Locale
🌏Internationalize js apps 👔Elegant lightweight library based on Internationalization API
Stars: ✭ 290 (+116.42%)
Mutual labels:  reactjs-components
React Spaces
React components that allow you to divide a page or container into nestable anchored, scrollable and resizable spaces.
Stars: ✭ 928 (+592.54%)
Mutual labels:  reactjs-components
crud-app
❄️ A simple and beautiful CRUD application built with React.
Stars: ✭ 61 (-54.48%)
Mutual labels:  reactjs-components
Form For
ReactJS forms made easy
Stars: ✭ 118 (-11.94%)
Mutual labels:  reactjs-components
React Scope
Visualize your React components as you interact with your application.
Stars: ✭ 316 (+135.82%)
Mutual labels:  reactjs-components
Mernapp youtube
Build a MERN Stack App from scratch, and deploy it to Heroku
Stars: ✭ 51 (-61.94%)
Mutual labels:  reactjs-components
react-tailwind
This is a complementary React code for the tailwindcss project.
Stars: ✭ 29 (-78.36%)
Mutual labels:  reactjs-components
Ui Neumorphism
📕 React component library designed on the "new skeuomorphism" or "neumorphism" UI/UX trend.
Stars: ✭ 258 (+92.54%)
Mutual labels:  reactjs-components
React Absolute Grid
An absolutely positioned, animated, filterable, sortable, drag and droppable, ES6 grid for React.
Stars: ✭ 910 (+579.1%)
Mutual labels:  reactjs-components
react-forms
Declarative forms for React
Stars: ✭ 35 (-73.88%)
Mutual labels:  reactjs-components
React Multi Select
A Multi Select component built with and for React
Stars: ✭ 111 (-17.16%)
Mutual labels:  reactjs-components
quiz
🚀 🤖 Quiz Application With React Javascript
Stars: ✭ 22 (-83.58%)
Mutual labels:  reactjs-components
React Login Modal Sm
Customizable React Social Media login modal
Stars: ✭ 23 (-82.84%)
Mutual labels:  reactjs-components
React Trello
Pluggable components to add a kanban board to your application
Stars: ✭ 1,788 (+1234.33%)
Mutual labels:  reactjs-components
Reactables
GigaTables is a ReactJS plug-in to help web-developers process table-data in applications and CMS, CRM, ERP or similar systems.
Stars: ✭ 112 (-16.42%)
Mutual labels:  reactjs-components
React Semantic Ui Example
React Semantic UI Example
Stars: ✭ 29 (-78.36%)
Mutual labels:  reactjs-components

This repository contains old version 1 of Iconify for React.

The latest version has been moved to Iconify monorepo: https://github.com/iconify/iconify/tree/master/packages/react

Iconify for React

Iconify is a modern open source SVG alternative to glyph fonts. It is a unified framework, aimed to offer all popular icon sets with one easy to use syntax: Font Awesome, Material Design Icons, Jam Icons and several emoji sets: Noto Emoji, Twemoji, EmojiOne, Firefox OS Emoji.

You can use over 40,000 icons without installing multiple dependencies. It can also be used with custom and premium icon sets. No fonts, no massive packages.

Iconify for React generates separate files for each icon, so when compiling your application only icons you use in project will be bundled. That means you can use FontAwesome, MDI, Vaadin, EmojiOne and other icons on same page without loading massive amounts of data.

Installation

If you are using NPM:

npm install @iconify/react

If you are using Yarn:

yarn add @iconify/react

This package does not include icons. Icons are split into separate packages that available at NPM. See below.

Usage

Install @iconify/react and packages for selected icon sets. Import Icon and/or InlineIcon from @iconify/react and icon data for icon you want to use:

import { Icon, InlineIcon } from "@iconify/react";
import home from "@iconify/icons-mdi-light/home";
import faceWithMonocle from "@iconify/icons-twemoji/face-with-monocle";

Then use Icon or InlineIcon component with icon data as "icon" parameter:

<Icon icon={home} />
<p>This is some text with <InlineIcon icon={faceWithMonocle} /></p>

Icon and InlineIcon

Both components are the same, the only difference is InlineIcon has negative vertical alignment, so it behaves like a glyph.

Use Icon for decorations, InlineIcon if you are migrating from glyph font.

Properties

You can pass any custom properties to Icon and InlineIcon.

Custom properties:

  • icon - required property, value is icon data.
  • width, height - width and/or height of icon. If one attribute is set, other attribute will be calculated using width/height ratio of icon. Default value is "1em".
  • hFlip, vFlip - boolean attributes. You can use them to flip icon vertically or horizontally
  • flip - string attribute, same as hFlip and vFlip. Value is "horizontal", "vertical" or "horizontal,vertical"
  • rotate - rotate icon. Value is number 0-3 (1 = 90deg, 2 = 180deg, 3 = 270deg) or string "90deg", "180deg", "270deg"
  • color - icon color, usable only for colorless icons. By default colorless icons use currentColor, so you can set color using stylesheet by setting text color. This property can override it.
  • align - icon alignment. It matters only when width and height are both set and width/height ratio doesn't match icon ratio. Value is a string that includes any of these values separated by comma: horizontal alignment: "left", "center", "right", vertical alignment: "top", "middle", "bottom", slice: "meet", "slice". Example: align="left,middle,slice". Default value is "center,middle,meet"

TypeScript

Iconify for React is compatible with TypeScript.

If you are using TypeScript, only attributes "id", "className" and "style" are passed to node. If you want to pass other custom attributes, edit dist/icon.d.ts file (or suggest a change by opening issue on @iconify/react repository).

Icon Packages

As of version 1.1.0 this package no longer includes icons. There are over 40k icons, each in its own file. That takes a lot of disc space. Because of that icons were moved to multiple separate packages, one package per icon set.

You can find all available icons at https://iconify.design/icon-sets/

Browse or search icons, click any icon and you will see a "React" tab that will give you exact code for the React component.

Import format for each icon is "@iconify/icon-{prefix}/{icon}" where {prefix} is collection prefix, and {icon} is the icon name.

Usage examples for a few popular icon packages:

Material Design Icons

Package: https://www.npmjs.com/package/@iconify/icons-mdi

Icons list: https://iconify.design/icon-sets/mdi/

Installation:

npm install @iconify/icons-mdi

Usage:

import { Icon, InlineIcon } from "@iconify/react";
import home from "@iconify/icons-mdi/home";
import accountCheck from "@iconify/icons-mdi/account-check";
<Icon icon={home} />
<p>This is some text with <InlineIcon icon={accountCheck} /></p>

Simple Icons (big collection of logos)

Package: https://www.npmjs.com/package/@iconify/icons-simple-icons

Icons list: https://iconify.design/icon-sets/simple-icons/

Installation:

npm install @iconify/icons-simple-icons

Usage:

import { Icon, InlineIcon } from "@iconify/react";
import behanceIcon from "@iconify/icons-simple-icons/behance";
import mozillafirefoxIcon from "@iconify/icons-simple-icons/mozillafirefox";
<Icon icon={behanceIcon} />
<p>Mozilla Firefox <InlineIcon icon={mozillafirefoxIcon} /> is the best browser!</p>

Font Awesome 5 Solid

Package: https://www.npmjs.com/package/@iconify/icons-fa-solid

Icons list: https://iconify.design/icon-sets/fa-solid/

Installation:

npm install @iconify/icons-fa-solid

Usage:

import { Icon, InlineIcon } from "@iconify/react";
import toggleOn from "@iconify/icons-fa-solid/toggle-on";
import chartBar from "@iconify/icons-fa-solid/chart-bar";
<Icon icon={chartBar} />
<p><InlineIcon icon={toggleOn} /> Click to toggle</p>

Noto Emoji

Package: https://www.npmjs.com/package/@iconify/icons-noto

Icons list: https://iconify.design/icon-sets/noto/

Installation:

npm install @iconify/icons-noto

Usage:

import { Icon, InlineIcon } from "@iconify/react";
import greenApple from "@iconify/icons-noto/green-apple";
import huggingFace from "@iconify/icons-noto/hugging-face";
<Icon icon={greenApple} />
<p>Its time for hugs <InlineIcon icon={huggingFace} />!</p>

Other icon sets

There are over 50 icon sets. This readme shows only few examples. See Iconify icon sets for a full list of available icon sets. Click any icon to see code.

License

React component is released with MIT license.

© 2019 Vjacheslav Trushkin

See Iconify icon sets page for list of collections and their licenses.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].