https://github.com/acrool/acrool-react-iconsvg
react icon component by svg symbols
https://github.com/acrool/acrool-react-iconsvg
icon icon-symbols react
Last synced: about 1 month ago
JSON representation
react icon component by svg symbols
- Host: GitHub
- URL: https://github.com/acrool/acrool-react-iconsvg
- Owner: acrool
- License: mit
- Created: 2022-06-24T07:31:11.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T01:15:22.000Z (9 months ago)
- Last Synced: 2025-03-26T19:02:52.405Z (about 2 months ago)
- Topics: icon, icon-symbols, react
- Language: TypeScript
- Homepage: https://acrool-react-iconsvg.pages.dev/
- Size: 1.26 MB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-react - Acrool React Icon Symbols - Icon (React underlying structure)
- awesome-react - Acrool React Icon Symbols - Icon (React underlying structure)
README
# Acrool React IconSvg
This is the element using svg symbol as icon in React[](https://www.npmjs.com/package/@acrool/react-iconsvg)
[](https://github.com/acrool/react-iconsvg/blob/main/LICENSE)
[](https://github.com/acrool/acrool-react-iconsvg/blob/main/LICENSE)[](https://www.npmjs.com/package/@acrool/react-iconsvg)
[](https://www.npmjs.com/package/@acrool/react-iconsvg)## Features
- Through the React component method, you can easily use the icon and change the size and color by specifying the Icon code.
- Use Icon Symbols to support multi-color Icon
- Support Nextjs 14+## Install
```bash
yarn add @acrool/react-iconsvg
```## Usage
add in your main.tsx
```ts
import '@acrool/react-iconsvg/dist/index.css';
```> if you need `@acrool/react-iconsvg`, use rwd size setting,
add custom icon component in your project, copy [IconComponent](./example/src/library/acrool-react-icon/Icon.tsx) files.## add Svg Symbols file `src/library/acrool-react-icon/SvgSymbols.tsx`
```tsx
const SvgSymbol = (
);
export default SvgSymbol;
```in your App.tsx
```tsx
import {SvgSymbol} from '@/library/acrool-react-icon';const App = () => {
return;
{SvgSymbol} {/* <~ add this */}
}
```## Use Sample
```tsx
window.alert('click!')}/>
```## Tools
[acrool-icon-symbols](https://github.com/acrool/acrool-icon-symbols) - svgs build icon-symbols## Online Manager
[acrool](https://docs.acrool.com/icon/manage-icon-symbol) - Project management system, providing icon management toolsThere is also a example that you can play with it:
[](https://acrool-react-iconsvg.pages.dev)
## License
MIT © [Acrool](https://github.com/acrool) & [Imagine](https://github.com/imagine10255)