@youngmanalive/react-unicons
v1.0.0
Published
4,500+ vector icons as easy to use React Components
Maintainers
Readme
React Unicons
This is a fork of
@iconscout/react-unicons.The original package hasn't been updated on npm since v2.0.1 and triggers the
"Support for defaultProps will be removed from function components"warning in React 18.3+ / React 19. This fork fixes that, adds TypeScript declarations, and is published as@youngmanalive/react-unicons.
1,206 pixel-perfect vector icons as React components. Icons designed by IconScout.
What's different from the original?
- No more
defaultProps-- uses ES6 default parameters instead, eliminating React 19 deprecation warnings. - TypeScript support -- ships with
.d.tsdeclarations for full editor intellisense. - Published and up to date -- available on npm as
@youngmanalive/react-unicons.
Installation
npm install @youngmanalive/react-uniconsUsage
Individual icons (recommended for tree-shaking)
import React from 'react';
import UilReact from '@youngmanalive/react-unicons/icons/uil-react';
const App = () => {
return <UilReact size="140" color="#61DAFB" />;
};
export default App;Named imports from the barrel
import React from 'react';
import { UilReact } from '@youngmanalive/react-unicons';
const App = () => {
return <UilReact size={140} color="#61DAFB" />;
};
export default App;Props
| Prop | Type | Default |
|------|------|---------|
| color | string | 'currentColor' |
| size | string \| number | 24 |
| ...rest | Any valid SVG attribute | -- |
Related
- Unicons -- the SVG source icons
- Vue Unicons by Anton Reshetov
License
The underlying Unicons SVGs are licensed under Apache 2.0.
