-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# react-native-icons-builder | ||
|
||
## Introduction | ||
`react-native-icons-builder` is a CLI tool designed to generate React Native icons from the React Icons library. It uses SWC to transform the React Icons code into React Native components. | ||
|
||
https://react-icons.github.io/react-icons/ | ||
|
||
Check out the icons you want here and enter the following command: | ||
```sh | ||
> npx react-native-icons-builder add AiFillApple | ||
``` | ||
|
||
## Motivation | ||
|
||
React Icons are not natively compatible with React Native. Bundling all icons from React Icons into a React Native project can lead to larger bundle sizes since Metro doesn’t support Tree Shaking effectively. This tool provides an easy way to use React Icons within React Native without the risk of bloated bundle sizes. | ||
|
||
## Key Features | ||
|
||
* No additional dependencies are required, except for react-native-svg, which is commonly used in React Native. | ||
* No native code is involved, making it simple to integrate. | ||
* Supports all icons available in the React Icons library. | ||
|
||
## Usage | ||
* Basic | ||
```sh | ||
> npm install react-native-svg # or use pnpm or yarn | ||
> npx react-native-icons-builder init | ||
> npx react-native-icons-builder add AiFillApple # visit https://react-icons.github.io/react-icons/ | ||
``` | ||
|
||
* Shorthand | ||
```sh | ||
> npm install react-native-svg react-native-icons-builder # or use pnpm or yarn | ||
> npm rn-icons init | ||
> npx rn-icons add AiFillApple # visit https://react-icons.github.io/react-icons/ | ||
``` | ||
|
||
|
||
## Credit | ||
This project is based on `react-icons`. | ||
https://github.com/react-icons/react-icons | ||
Thank you for `react-icons`. |