Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@maqe-vue/text-input
Advanced tools
Readme
The Vue2 component for text-input
See demo on: Storybook
Install the npm package.
npm install @maqe-vue/text-input --save
import VmqInput from '@maqe-vue/text-input'
import '@maqe-vue/text-input/dist/style.css'
Vue.component('vmq-input', VmqInput)
<vmq-input v-model="input" type="text"/>
<vmq-input
v-model="input"
type="text"
label-style="label-inside"
/>
<vmq-input
v-model="input"
type="text"
label-style="label-border"
/>
<vmq-input
v-model="email"
label-style="label-inside"
:state="true"
state-valid-text="You can use this email"
/>
<vmq-input
v-model="email"
label-style="label-inside"
:state="false"
>
<template v-slot:state-invalid-text>
<span>
Invalid
<u>email</u>
</span>
</template>
</vmq-input>
Name | Type | Description | default |
---|---|---|---|
v-model | bind | ||
type | string | `text | password` |
containerClass | string | ||
color | string | `name | hex |
label-style | string | `label-inside | |
label | string | ||
placeholder | string | ||
state | `boolean | null` | |
state-valid-text | string | ||
state-invalid-text | string | ||
helper-text | string | ||
icon-prepend | `string | array` | |
icon-append | `string | array` | |
disabled | boolean | false | |
loading | boolean | false | |
clearable | boolean | false | |
autofocus | boolean | false | |
readonly | boolean | false | |
trim | boolean | false | |
timeout | number | Timeout to trigger parent component in millisecond ex. 3000 | 0 |
regex | string | `ENGLISH_ALPHABET_ONLY | ENGLISH_AND_NUMBER_ONLY |
Name | Type | Description | default |
---|---|---|---|
state-valid-text | |||
state-invalid-text | |||
icon-prepend | left side icon | ||
icon-append | right side icon | ||
helper-text |
<vmq-input v-model="input">
<!-- custom icon-prepend -->
<template v-slot:icon-prepend>
<i class="fa fas-user"></i>
</template>
</vmq-input>
<vmq-input v-model="input">
<!-- custom helper text -->
<template v-slot:helper-text>
<span>
Helper
<u>Text</u>
</span>
</template>
</vmq-input>
Name | Type | Description | default |
---|---|---|---|
select(value, event) | function | Invoked when input is selected. | |
focus(value, event) | function | Invoked when input gains focus. | |
blur(value, event) | function | Invoked when input loses focus. | |
change(value, event) | function | Invoked when input changes. | |
keyup(value, event) | function | Invoked when a key is released. | |
keydown(value, event) | function | Invoked when the user presses a keyboard key. | |
keypress(value, event) | function | Invoked when the user presses a key on the keyboard. |
<vmq-input
type="text"
label-style="label-border"
@change="handleChange"
/>
methods: {
handleChange(value, event) {
// code here
}
}
.vmq-input-wrapper
.vmq-input-textfield
.vmq-input-label
.vmq-input-state
.vmq-input-icon-prepend
.vmq-input-icon-append
.vmq-input-helper
.vmq-input-clear
Custom input style with css variable
<vmq-input
v-model="input"
label-style="label-inside"
/>
// for example to set as a global
<style>
:root {
--vmq-text-input-colo: tan;
--vmq-text-input-border-width 1px;
}
</style>
Custom for dark mode.
<vmq-input
v-model="input"
type="text"
label-style="label-border"
containerClass="custom-text-input"
/>
<vmq-input
v-model="input"
type="password"
label-style="label-border"
containerClass="custom-text-input"
/>
<style lang="scss">
body {
background: #252524;
}
.custom-text-input {
.vmq-input-textfield {
color: #fff;
}
.vmq-input-label, .vmq-input-helper {
color: rgba(255,255,255,.7);
}
}
</style>
FAQs
The Vue2 component for text input
We found that @maqe-vue/text-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).