react-icons-components
v1.2.2
Published
SVG-based React icon components
Readme
React icons components
What is React icons components?
React icons components is a collection of simply beautiful open source icons for React.js. Each icon is designed on a 24x24 grid with an emphasis on simplicity, consistency and readability.
Based on React icons components
Installation
yarn add react-icons-componentsor
npm i react-icons-componentsUsage
import React from 'react';
import { Home } from 'react-icons-components';
const App = () => {
return <Home />
};
export default App;Icons can be configured with inline props:
<Home color="red" />If you can't use ES6 imports, it's possible to include icons from the compiled folder ./dist.
var Home = require('react-icons-components/dist/Home').default;
var MyComponent = React.createClass({
render: function () {
return (
<Home />
);
}
});You can also include the whole icon pack:
import React from 'react';
import * as Icon from 'react-icons-components';
const App = () => {
return <Icon.Home />
};
export default App;Props
| Key | Default | Type |
|-------------|-----------------------|------------------------------------|
| color | undefined (inherit) | String |
| fontSize | 24 | String or Number |
| className | undefined | string |
| style | undefined | Can overwrite size and color |
| title | undefined | Icon description for accessibility |
