# vue-svg-component-runtime

> Runtime for supporting SVG-as-Vue Components

Latest version **1.0.1** (published 2018-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-svg-component-runtime
pnpm add vue-svg-component-runtime
yarn add vue-svg-component-runtime
bun add vue-svg-component-runtime
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-05-08 |
| First published | 2018-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Wade Tandy |
| Maintainers | wadetandy |
| Keywords | vue, vuejs, svg, svg-icons |

## Links

- npm: https://www.npmjs.com/package/vue-svg-component-runtime
- Repository: https://github.com/wadetandy/vue-svg-component-builder
- Homepage: https://github.com/wadetandy/vue-svg-component-builder#readme
- Issues: https://github.com/wadetandy/vue-svg-component-builder/issues
- npm.io page: https://npm.io/package/vue-svg-component-runtime

## 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

- 1.0.1 (latest) — 2018-05-08
- 1.0.0 — 2018-05-08

## README

# vue-svg-component-builder

This is a small utility library for creating directly-renderable VueJS components from SVG images.
It is primarily designed to be used as a building block for other libraries which will handle the work
of actually reading and parsing the SVGs into something usable by this library.

## Installation

Simply run `yarn add vue-svg-component-builder` or `npm install vue-svg-component-builder`.

## Usage

This library exports a single `build` function which takes in an SVG and returns a view component. Currently
the only accepted format for the input is the AST output of `vue-component-compiler`

```javascript
import { build } from 'vue-svg-component-builder'
import { compile } from 'vue-component-compiler'

let svg = fs.readFileSync('filename.svg').toString()
let compiled = compile(svg)

Vue.extend({
  components: {
    TestSvg: build(compiled.ast)
  }
})
```

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