# em-icon

> Иконка из шрифта

Latest version **3.0.1** (published 2021-06-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install em-icon
pnpm add em-icon
yarn add em-icon
bun add em-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 | 3.0.1 |
| Published | 2021-06-02 |
| First published | 2021-06-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 416 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Egor |
| Maintainers | eeegooorrr |

## Links

- npm: https://www.npmjs.com/package/em-icon
- Homepage: https://github.com/eeegooorrr/em-npm/tree/em-icon
- npm.io page: https://npm.io/package/em-icon

## Recent versions

- 3.0.1 (latest) — 2021-06-02
- 3.0.0 — 2021-06-01

## README

# em-icon
> Icon svg asset or font

## Install

```bash
npm install --save em-icon
```

## Add to project

#### Global


```css
#stylesheet.css
@font-face{font-family:'Icons';src:url('icon.ttf');}
@font-face{font-family:'IconsMain';src:url('icon-main.ttf');}
```
### Vue.use options

Vue.use(EmIcon,options) | Component | Options
--------- | ---- | ------- | -----------
```js
//Code point data
//./glyphs/icons1.js
export default [
{name: 'icon_name', code_point: 'e001'},
{name: 'icon2_name', code_point: 'e002'}
]
//./glyphs/icons2.js
export default [
    {name: 'icon_name', code_point: 'e001'},
    {name: 'icon2_name', code_point: 'e002'}
]
//./glyphs/index.js
export { default as Icons1} from './icons'
export { default as Icons2} from './icons2'
```

```js
// main.js
import EmIcon from "em-icon";
import {Icons,IconsMain} from './glyphs/index'
Vue.use(EmIcon,{
    glyphs:[
        {font:'Icons',data:Icons},
        {font:'IconsMain',data:IconsMain}
        ]})
Vue.use(EmIcon);
```

#### Local Usage

```html
<template>
  <div>
      <em-icon name="icon_name" />
      <em-icon name="icon_name" font="IconsMain" />
  </div>
</template>
<script>
  export default {
    name: 'component.vue',
    components: {EmSvg},
  }
</script>
```

## Setup
### Parameters

Props(Parameter) | Type | Default | Description
--------- | ---- | ------- | -----------
name (*required*) | `String` | - | name icon(font) or path(svg)
font | `String` | `icons` | font family name
height | `Number` | null | height icon element
width  | `Number` | null | width icon element
is-pointer | `Boolean` | `false` | pointer event on/off
as-image | `Boolean` | `false` | icon as img



## License
[The MIT License](http://opensource.org/licenses/MIT)

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