# vue-naira-input

> A Vue component for inputting Naira-formatted amounts.

Latest version **1.1.2** (published 2020-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-naira-input
pnpm add vue-naira-input
yarn add vue-naira-input
bun add vue-naira-input
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2020-08-03 |
| First published | 2019-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 12.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Uk Chukundah |
| Maintainers | ukchukx |
| Keywords | vue, currency, input, naira |

## Links

- npm: https://www.npmjs.com/package/vue-naira-input
- Repository: https://github.com/ukchukx/vue-naira-input
- Homepage: https://github.com/ukchukx/vue-naira-input#readme
- Issues: https://github.com/ukchukx/vue-naira-input/issues
- npm.io page: https://npm.io/package/vue-naira-input

## Dependencies (2)

- [vue-text-mask](https://npm.io/package/vue-text-mask.md) ^6.1.2
- [text-mask-addons](https://npm.io/package/text-mask-addons.md) ^3.8.0

## Recent versions

- 1.1.2 (latest) — 2020-08-03
- 1.1.1 — 2020-08-03
- 1.1.0 — 2020-08-02
- 1.0.2 — 2019-06-27
- 1.0.1 — 2019-06-27
- 1.0.0 — 2019-06-27

## README

# vue-naira-input

A Vue component for inputting Naira-formatted amounts.

## Installation

```js
npm i -S vue-naira-input
```

### Browser

```html
<script type="text/javascript" src="https://unpkg.com/vue"></script>
<script type="text/javascript" src="https://unpkg.com/vue-naira-input"></script>
<script type="text/javascript">
  Vue.use(NairaInput);
</script>
```

### Module

```js
import NairaInput from 'vue-naira-input';
```

## Usage

Once installed, it can be used in a template as simply as:

```html
<naira-input ref="nairaInput" :initial-amount="initialAmount" v-model="amount" />
```

Or styled as a Bootstrap input:

```html
<naira-input class="form-control" ref="nairaInput" :initial-amount="initialAmount" v-model="amount" />
```

The currency prefix can be changed:

```html
<naira-input ref="nairaInput" currency-symbol="$" :initial-amount="initialAmount" v-model="amount" />
```

To clear the input, call:
```js
this.$refs.nairaInput.clear();
```

To reset the input to the initial value, call:
```js
this.$refs.nairaInput.reset();
```

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