# handlebars-helper-icon

> A helper to use packaged svg icons inline

Latest version **2.0.0** (published 2016-08-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install handlebars-helper-icon
pnpm add handlebars-helper-icon
yarn add handlebars-helper-icon
bun add handlebars-helper-icon
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-08-30 |
| First published | 2016-04-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Aria Stewart |
| Maintainers | aredridel, bcoe, jefflembeck, jlembeck |
| Keywords | handlebars, svg |

## Links

- npm: https://www.npmjs.com/package/handlebars-helper-icon
- Repository: https://github.com/npm/handlebars-helper-icon
- Homepage: https://github.com/npm/handlebars-helper-icon#readme
- Issues: https://github.com/npm/handlebars-helper-icon/issues
- npm.io page: https://npm.io/package/handlebars-helper-icon

## Dependencies (3)

- [ltx](https://npm.io/package/ltx.md) ^2.3.0
- [resolve](https://npm.io/package/resolve.md) ^1.1.7
- [murmurhash](https://npm.io/package/murmurhash.md) 0.0.2

## Recent versions

- 2.0.0 (latest) — 2016-08-30
- 1.0.6 — 2016-05-25
- 1.0.5 — 2016-04-13
- 1.0.4 — 2016-04-12
- 1.0.3 — 2016-04-12
- 1.0.2 — 2016-04-12
- 1.0.1 — 2016-04-12
- 1.0.0 — 2016-04-12

## README

handlebars-helper-icon
======================

A helper to inline svg icons efficiently

Use
----

Register this module as a handlebars helper, and then you can load SVG icons
from packages.

In your template:

```
<div class='thing'>
    {{icon "somepackage/test.svg" width="109"}}
</div>
<div class='someotherplace'>
    {{icon "somepackage/test.svg" width="22"}}
</div>
```

The SVG will be inlined as a symbol, and all further uses on a page will only
have a small `<use>` element referring to the definition.

This module only works for server-side rendering, though contributions to add
browser support are welcome.

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