# svg-web-component

> web component for rendering svg icons

Latest version **1.0.1** (published 2019-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install svg-web-component
pnpm add svg-web-component
yarn add svg-web-component
bun add svg-web-component
```

## 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 | 1.0.1 |
| Published | 2019-12-15 |
| First published | 2019-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Datlyfe |
| Maintainers | datlyfe |

## Links

- npm: https://www.npmjs.com/package/svg-web-component
- Repository: https://github.com/Datlyfe/svg-web-component
- Homepage: https://github.com/Datlyfe/svg-web-component#readme
- Issues: https://github.com/Datlyfe/svg-web-component/issues
- npm.io page: https://npm.io/package/svg-web-component

## Dependencies (1)

- [@webcomponents/webcomponentsjs](https://npm.io/package/@webcomponents/webcomponentsjs.md) ^2.0.2

## Recent versions

- 1.0.1 (latest) — 2019-12-15
- 1.0.0 — 2019-12-15

## README

# svg-web-component

A custom web component for rendering svg icons.

## Instalation

### NPM

```shell
npm install svg-web-component
(or)
yarn add svg-web-component
```

Add your svg data by calling the load function which takes an object where the key is the icon name and the value is the svg source,

```javascript
import svgWebComponent from "svg-web-component";
SvgWebComponent.load({
  plus:
    '<svg  viewBox="0 0 24 24"><path d="M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z"/></svg>'
});
```

### Browser

```html
<script src="svg-web-component.js"></script>
<script>
  SvgWebComponent.default.load({
    plus:
      '<svg  viewBox="0 0 24 24"><path d="M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z"/></svg>'
  });
</script>
```

## Usage

```html
<svg-icon name="plus"></svg-icon>
```

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