# @thijsvdanker/vue-protect-form

> Vue Component to protect users from leaving a form with changes

Latest version **0.1.2** (published 2019-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @thijsvdanker/vue-protect-form
pnpm add @thijsvdanker/vue-protect-form
yarn add @thijsvdanker/vue-protect-form
bun add @thijsvdanker/vue-protect-form
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-02-28 |
| First published | 2019-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 280.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | thijsvdanker |

## Links

- npm: https://www.npmjs.com/package/@thijsvdanker/vue-protect-form
- Repository: https://github.com/thijsvdanker/vue-protect-form
- Homepage: https://thijsvdanker.github.io/vue-protect-form/
- Issues: https://github.com/thijsvdanker/vue-protect-form/issues
- npm.io page: https://npm.io/package/@thijsvdanker/vue-protect-form

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.5.22

## Recent versions

- 0.1.2 (latest) — 2019-02-28
- 0.1.1 — 2019-02-26
- 0.1.0 — 2019-02-26

## README

# vue protect form [![CircleCI](https://circleci.com/gh/thijsvdanker/vue-protect-form.svg?style=svg)](https://circleci.com/gh/thijsvdanker/vue-protect-form)[![npm](https://img.shields.io/npm/v/@thijsvdanker/vue-protect-form.svg)](https://www.npmjs.com/package/@thijsvdanker/vue-protect-form)

Protects users from leaving a form with changes by showing a dialog.

## Install
You can install it via NPM
```bash
npm install @thijsvdanker/vue-protect-form --save
```

### Usage
Include plugin in your `main.js` file.
```javascript
import VueProtectForm from 'vue-protect-form'

Vue.use(VueProtectForm)
```

To protect a form, wrap the form with a `<vue-protect-form>` tag.<br>
Example:
```js
<vue-protect-form>
    <form method="POST" action="/">
        <input type="text" name="foo">
    </form>
</vue-protect-form>
```

## Documentation
For documentation about properties and usage checkout the [docs](https://thijsvdanker.github.io/vue-protect-form/)


## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](./LICENSE.md)

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