open-index/open-npm huggingface dataset:
npm package: @swiftread/fontawesome
Description: This library exports React Native components for each of FontAwesome's 2,025 free icons.
Latest version: 0.0.10

# 🎨 React Native FontAwesome

```ts
import { FaSolidAddressBook } from '@swiftread/fontawesome'

export const Icon = () => <FaSolidAddressBook />
```

## Overview

This library exports React Native components for each of [FontAwesome's 2,025 free icons](https://fontawesome.com/search?o=r&m=free). Based on [nandorojo's react-native-heroicons](https://github.com/nandorojo/react-native-heroicons).

- 😎 Free, beautiful icons
- 🔥 Customizable with `react-native-svg` props
- 🌲 Tree-shaken components
- 🤖 TypeScript support
- 📈 JS-only (+ works with Expo)




## Installation

```sh
yarn add @swiftread/fontawesome react-native-svg
```

## Usage

Each icon is exported as its own component with an adjusted name.

For example, to use the solid `address-book` icon, import `FaSolidAddressBook`:

```tsx
import { FaSolidAddressBook } from '@swiftread/fontawesome'
```

You can also `import * as Fontawesome`:

```tsx
import * as FontAwesome from '@swiftread/fontawesome'

export const Icon = () => <FontAwesome.FaSolidAddressBook />
```

For a full directory of components, see the [FontAwesome](https://fontawesome.com/search?o=r&m=free) website.

### Custom color

```tsx
<FaSolidAddressBook color="black" />
```

### Custom size

```tsx
<FaSolidAddressBook height={30} width={30} />
```

## Props

Each icon component accepts all the props from `react-native-svg`'s `Svg` component. Reference [their docs](https://github.com/react-native-svg/react-native-svg#svg).

## How it works

This library uses `react-native-svg`. The components are generated by `svgr`. I downloaded all the free icons from [FontAwesome](https://fontawesome.com/download) and [ran a script](/generate/index.ts) to codegen the files from there.

## Contributing

Since FontAwesome updates their icons somewhat frequently, you may want to import the new ones. These are the steps to update this library with new icons:

1. Fork this repo
2. Download the full folder of free icons from [FontAwesome](https://fontawesome.com/download)
3. Replace the `generate/fontawesome/svgs` folder with the the `svgs` folder you downloaded
4. Run `yarn install` and `yarn prepare`
5. Commit your changes, and open a PR!