# react-svgicon

> React component for rendering inline SVG icons

Latest version **0.0.2** (published 2015-03-08) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install react-svgicon
pnpm add react-svgicon
yarn add react-svgicon
bun add react-svgicon
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-03-08 |
| First published | 2015-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Articulate |
| Maintainers | rpearce |
| Keywords | react, svg, icon |

## Links

- npm: https://www.npmjs.com/package/react-svgicon
- Repository: https://github.com/articulate/react-svgicon
- Issues: https://github.com/articulate/react-svgicon/issues
- npm.io page: https://npm.io/package/react-svgicon

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^0.12.2

## 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.2 (latest) — 2015-03-08
- 0.0.1 — 2015-03-08

## README

# react-svgicon
React component for rendering inline SVGs via an SVG sprite.

## Installation
```shell
$ npm install react-svgicon --save
```

## Usage
```javascript
var Icon = require('react-svgicon');

var Example = React.createClass({
  render: function() {
    return {
      Icon({
        name: 'icon-clock',   // String | required | xlink-href of your inline SVG without the #
        className: 'myClass', // String | optional
        style: {}             // Object | optional
      })
    }
  }
});
```

_Note: This library assumes you have already loaded your SVG sprite at
the top of your `<body>` element like this:_
```html
<body>
  <svg xmlns="http://www.w3.org/2000/svg" class="is-hidden">
    <symbol viewBox="0 0 36 36" id="icon-clock">
      <!-- SVG path/polygon code here -->
    </symbol>
  </svg>
  <!-- rest of code -->
</body>
```

## Contributing
* Fork it
* Create a feature branch
  ```shell
  $ git checkout -b my-feature-branch
  ```
* Create a pull request

## Development
Building the example code:
```shell
$ npm run build:example
```

Compiling the `src`:
```shell
$ npm run prepublish
```

Run the specs:
```shell
$ npm test
```

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