🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

vue-custom-inputs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-custom-inputs

Vue component for custom input, mobile web input, simulating native app input.

1.0.4
latest
Source
npm
Version published
Weekly downloads
3
-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

Vue custom input version vue

Vue custom input is a vue component for custom split input box, mobile web input box, simulating native app input box and etc. It's designed to input password and verification code. But you can also use it in other situation as you wish.

Demo

https://youjingyu.github.io/vue-custom-input/dist/example/

Installation

npm i vue-custom-inputs -S

Usage

use in vue single file components

<template>
    <custom-input
        input-height="50px"
        :input-number="4"
        input-type="number"
        input-style-type="oneBorder"
        @custom-input-change="change"
        @custom-input-complete="complete">
    </custom-input>
</template>
<script>
    import customInput from 'vue-custom-input';
    export default {
        components: { 'custom-input': customInput },
        methods: {
            change(val) {
                
            },
            complete(val) {
                
            }
        }
    }
</script>

use in browser globals

<div id="app">
    <custom-input></custom-input>
</div>
<script src="vue.js"></script>
<script src="vue-custom.js"></script>
<script>
     new Vue({
        el: '#app',
        components: {
            'custom-input': window.customInput
        }
     });
</script>

API

Vue custom input component attributes:

Attr. NameDescriptionRequiredTypeDefault Value
custom-input-changecalled when input value is changedNFunction-
custom-input-completecalled when all input boxes are filledNFunction-
input-numberinput box numberNNumber4
input-style-typetwo preset styles. You can also design your style by the following attributesN'allBorder', 'oneBorder''allBorder'
input-typejust like html5 input type attribute, can be tel, number, text and etc.NString'text'
password-charthe character showed in input box when the input-type is passwordNString'*'
input-widthinput box widthNString-
input-heightinput box heightNString'50px'
input-border-widthinput box border widthNString'1px'
input-border-colorinput box border colorNString'#20A0FF'
input-active-outline-colorinput box outline color when focus on itNString'#58B7FF'
input-stylecustomize input box style as you want. All styles will be injected into box's style attributeNObject{}
input-active-styleinput box style when focus on it. All styles will be injected into box's style attributeNObject{}

Keywords

vue

FAQs

Package last updated on 12 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts