# @weslink/vue-pincode

> Neumorphism styled pincode input field for Vue.js

Latest version **0.2.1** (published 2020-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @weslink/vue-pincode
pnpm add @weslink/vue-pincode
yarn add @weslink/vue-pincode
bun add @weslink/vue-pincode
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2020-07-13 |
| First published | 2020-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 620.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Weslink GmbH |
| Maintainers | wlsupport |
| Keywords | pincode, pin, pin code, code, vue, vue.js, vue-pincode, weslink, neumorphism |

## Links

- npm: https://www.npmjs.com/package/@weslink/vue-pincode
- Repository: https://github.com/weslinkde/vue-pincode
- Homepage: https://weslinkde.github.io/vue-pincode/
- Issues: https://github.com/weslinkde/vue-pincode/issues
- npm.io page: https://npm.io/package/@weslink/vue-pincode

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2020-07-13
- 0.2.0 — 2020-07-11
- 0.1.0 — 2020-07-11

## README

<div align="center">
  <img width="200" height="200" src="src/assets/logo.png" alt="@weslink/vue-pincode">
</div>

### VuePincode

## Features
### :rocket: [See live demo](https://weslinkde.github.io/vue-pincode/) (Pin: 1234 is the right one)
- Simple pincode input field
- Neumorphism styling
- Smooth animations

## Installation
In your Vue.js project:

```
npm install @weslink/vue-pincode
```

###### :speech_balloon: If you prefer static files, import assets from the `dist` folder

## Basic example
###### Login.vue
```Vue
<template>
  <div id="app">
    <div class="container">
      <vue-pincode ref="pincodeInput" @pincode="login" />
    </div>
  </div>
</template>

<script>
import axios from 'axios';
import VuePincode from "./components/VuePincode";

export default {
  name: "Login",
  components: {
    VuePincode
  },
  methods: {
    async login(pincode) {
      try {
        const { data } = await axios.post(`/login`, { pincode })
        this.$refs.pincodeInput.triggerSuccess();
        return { success: true, status: data.status }
      } catch (e) {
        this.$refs.pincodeInput.triggerMiss();
        return { success: false, status: e.response.data.status }
      }
    },
  }
};
</script>
```

## Events

| Event       | Description                                                  |
| ----------- | ------------------------------------------------------------ |
| pincode     | Is triggered when the pincode is four characters long and passes it as parameter           |

## Project development
- `npm run serve` compiles and hot-reloads demo for development
- `npm run lint` lints and fixes files
- `npm run build` compiles and minifies production files and demo

## Licensing
Copyright :copyright: 2020 [Weslink GmbH](https://weslink.de), [MIT License](LICENSE)

Author: Dominik Lenz

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