Remix Icons as React Component
- Add the library as a dependency from NPM:
# yarn
yarn add react-remixicon
# npm
npm install react-remixicon
- Add a link to the font files in your project's HTML files:
<link href="https://cdn.remixicon.com/releases/v1.3.1/remixicon.css" rel="stylesheet">
View the DEMO
Prop name | Type | Default | Description |
---|---|---|---|
name | string | required | Icon name |
type | string | fill | Icon type |
size | string | 1x | Icon size |
role | string | presentation | Icon role |
style | Object | {} | Icon style |
ref | React.ref | null | Icon node |
import React from 'react';
import Icon from 'react-remixicon';
export default class App extends React.Component {
render() {
return (
<Icon name="home-3" type="line" size="3x" />
);
}
}