Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iconify/react

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iconify/react

Iconify icon component for React.

  • 4.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @iconify/react?

@iconify/react is a React component for Iconify, a versatile icon framework that allows you to use a wide range of icons from different icon sets. It provides a simple way to include icons in your React applications, supporting customizations such as size, color, and more.

What are @iconify/react's main functionalities?

Basic Icon Usage

This feature allows you to easily include an icon in your React component. You import the Icon component from @iconify/react and the specific icon from an icon set, then use it within your JSX.

import { Icon } from '@iconify/react';
import homeIcon from '@iconify-icons/mdi/home';

function App() {
  return (
    <div>
      <Icon icon={homeIcon} />
    </div>
  );
}

export default App;

Customizing Icon Size

This feature allows you to customize the size of the icon. You can set the width and height properties to adjust the icon's size.

import { Icon } from '@iconify/react';
import homeIcon from '@iconify-icons/mdi/home';

function App() {
  return (
    <div>
      <Icon icon={homeIcon} width="48" height="48" />
    </div>
  );
}

export default App;

Customizing Icon Color

This feature allows you to customize the color of the icon. You can set the color property to change the icon's color.

import { Icon } from '@iconify/react';
import homeIcon from '@iconify-icons/mdi/home';

function App() {
  return (
    <div>
      <Icon icon={homeIcon} color="red" />
    </div>
  );
}

export default App;

Inline Icon Usage

This feature allows you to use the icon inline with text. Setting the inline property to true makes the icon align with the text.

import { Icon } from '@iconify/react';
import homeIcon from '@iconify-icons/mdi/home';

function App() {
  return (
    <div>
      <Icon icon={homeIcon} inline={true} />
      <span>Home</span>
    </div>
  );
}

export default App;

Other packages similar to @iconify/react

FAQs

Package last updated on 29 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc