# vue-cleave-directive

> Vue.js directive for cleave.js

Latest version **1.0.3** (published 2020-06-25) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install vue-cleave-directive
pnpm add vue-cleave-directive
yarn add vue-cleave-directive
bun add vue-cleave-directive
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-06-25 |
| First published | 2020-05-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | KaliaJS |
| Maintainers | kaliajs |
| Keywords | vue, vue-js, cleave, cleave-js, directive, vue-directive |

## Links

- npm: https://www.npmjs.com/package/vue-cleave-directive
- Repository: https://github.com/KaliaJS/vue-cleave-directive
- Homepage: https://github.com/KaliaJS/vue-cleave-directive#readme
- Issues: https://github.com/KaliaJS/vue-cleave-directive/issues
- npm.io page: https://npm.io/package/vue-cleave-directive

## Recent versions

- 1.0.3 (latest) — 2020-06-25
- 1.0.2 — 2020-06-25
- 1.0.1 — 2020-05-15
- 1.0.0 — 2020-05-15

## README

# vue-cleave-directive

Vue.js directive for cleave.js

## Installation

##### Yarn
```sh
$ yarn add vue-cleave-directive
```

##### npm
```sh
$ npm install vue-cleave-directive --save
```

##### CDN
```html
<script src="https://unpkg.com/vue-cleave-directive/dist/vue-cleave-directive.min.js"></script>
```


## Usage

It's more simple if you use the directive globally :

```js
import Vue from 'vue'
import VueCleaveDirective from 'vue-cleave-directive'

Vue.use(VueCleaveDirective)
```

Best practice is to use the directive locally :

```js
import VueCleaveDirective from 'vue-cleave-directive'

<script>
  export default {
    directives: {
      cleave: VueCleaveDirective.directive
    },
  };
</script>
```

## Examples

Simply use the directive on your input that you want format.

```js
<template>
  <input v-cleave="{ date: true, datePattern: ['d', 'm', 'Y'] }">
</template>
```

It's also working with a Custom Component :

```js
<template>
  <FormInput v-cleave="{ date: true, datePattern: ['d', 'm', 'Y'] }" />
</template>
```

## License

ISC

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