VOOZH about

URL: https://www.geeksforgeeks.org/reactjs/react-suite-icon-extension/

⇱ React Suite Icon extension - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

React Suite Icon extension

Last Updated : 28 Jul, 2022

React suite is a library of React components, sensible UI design, and a friendly development experience. It is supported in all major browsers. It provides pre-built components of React which can be used easily in any web application.

In this article, we'll learn about React Suite Icon extension. For adding different icons instead of Rsuite Icons, the user can also use custom SVG icons, react icons, font awesome icons, and IconFont icons.

Syntax:

function App() {
 return (
 <div>
 <Icon as={FaHome || SvgIcon} />
 </div>
 );
}

Using React Icons Component:

Step 1: Install the @rsuite/icons package into your project directory.

npm install --save @rsuite/icons

Step 2: Import the Icons in your function component from the package.

import { Icon } from '@rsuite/icons';

Step 3: Install React Icon package into your project.

npm install react-icons --save

Example 1: Below example demonstrates the use of FontAwesome Icons.

Output:

👁 Image
 

Example 2: Below example demonstrates the use of React Icons.

Output:

👁 Image
 

Reference: https://rsuitejs.com/components/icon/#icon-extension

Comment