# sure-icons-react

> React components of Sure Svg Icons collection.

Latest version **0.0.0** (published 2022-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install sure-icons-react
pnpm add sure-icons-react
yarn add sure-icons-react
bun add sure-icons-react
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2022-08-02 |
| First published | 2022-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Saul |
| Maintainers | suressk |
| Keywords | icon, svg, react, sure-ui |

## Links

- npm: https://www.npmjs.com/package/sure-icons-react
- npm.io page: https://npm.io/package/sure-icons-react

## 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.0 (latest) — 2022-08-02

## README

# sure-icons-react

React components of Sure Svg Icons collection.

## Usage

```bash
npm i sure-icons-react
```

In `.tsx` / `.jsx` file：

```tsx
import { memo } from 'react'
import * as Icons from 'sure-icons-react'
// import { Delete, ArrowUp } from 'sure-icons-react'

// Generate random hexadecimal color values
import { getRandomHex } from 'sure-utils'

const IconsComponents = Object.entries(icons)

interface ICompProps {}

const Comp: React.FC<ICompProps> = () => {
  const Icons = IconsComponents.map((Icon) => {
    const [name, Comp] = Icon
    return (
      <i className={styles.icon} key={name} style={{
        color: getRandomHex()
      }}>
        <Comp />
      </i>
    )
  })
  return (
    <>
      {Icons}
    </>
  )
}

export default memo(Comp)
```

> It needs a wrapper tag, and the wrapper tag need to be set `height`, `width`, `color` and other styles. Otherwise, it will fill the icon displayed as the full width of the screen

```css
/** icon example styles */
.icon {
  width: 2em;
  height: 2em;
  color: #15559a;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-right: 16px;
  /* for hover scale animation */
  transition: all .3s ease-in-out;
  cursor: pointer;
}
```

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