# fa-icons-search

> Search for FontAwesome Icons, and output the correct label to use in React, Vue etc.

Latest version **0.0.5** (published 2018-12-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install fa-icons-search
pnpm add fa-icons-search
yarn add fa-icons-search
bun add fa-icons-search
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2018-12-04 |
| First published | 2018-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 55.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Travis Reynolds |
| Maintainers | travisreynolds |
| Keywords | fontawesome, search, icons, icon search, fa |

## Links

- npm: https://www.npmjs.com/package/fa-icons-search
- Repository: https://gitlab.com/travis-projects/fontawesome-icons-search
- npm.io page: https://npm.io/package/fa-icons-search

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2018-12-04
- 0.0.4 — 2018-11-22
- 0.0.3 — 2018-11-22
- 0.0.2 — 2018-11-22
- 0.0.1 — 2018-11-22

## README

# FontAwesome Icons Search

A simple package to search through the current FA Icons list, and output an icon.
For example, you could search for 'Facebook', and it would out put the 'facebook'.

A usecase for this: I use it in a Gatsby site, where the CMS has options to add social links, with a name. I get the array of links + names, then search for the correct icon to use for FontAwesome React - rather than hard coding 'Facebook' to match 'facebook', 'Twitter T' to match 'twitter-t' etc. You can simply create a loop, like so:

```javascript
const { searchBrand } = require('fa-icon-search')

// Component
{
  links.map(link => {
    const icon = searchBrand(link.name)
    return (
      <FontAwesomeIcon icon={['fab', icon.name ]} />
    )
  })
}
```

And you can have any number of links + icons, as opposed to:

```javascript
// Component
{
  links.map(link => {
    let icon
    if (link.name === 'Facebook') icon = 'facebook'
    if (link.name === 'twitter') icon = 'twitter'
    return (
      <FontAwesomeIcon icon={['fab', icon]} />
    )
  })
}
```

### Contributing

Any updates are welcome - create a MR in the repository.

---
_Source: https://npm.io/package/fa-icons-search · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
