nb-password-validation-section
This is a password (validator) component for Vue.js 3+.
Loading component...
This component is designed to accept the most secure password standard that is currently recommended:
- Minimum of 8 characters
- At least 1 uppercase letter
- At least 1 lowercase letter
- At least 1 number
- At least 1 special character (
!@#$%^&*(),.?:{}\|<>+-_)
Installation
Yarn
yarn add @vlalg-nimbus/nb-password
Usage
Vue 3
import { createApp } from 'vue'
import App from './App.vue'
import NbPasswordComponents from '@vlalg-nimbus/nb-password'
import "@vlalg-nimbus/nb-password/dist/style.css";
const app = createApp(App)
app.use(NbPasswordComponents)
app.mount('#app')
To use, simply call the component, in this case it will be NbPasswordValidationSection or nb-password-validation-section.
Mode 1
<template>
<NbPasswordValidationSection />
</template>
Preview & Playground
Select the component you want to edit/test
Loading Sandbox...
Props
Items with an (*) mean they are required
| name | Value type | Default | Description |
|---|---|---|---|
| nbId (*) | String | Sets the id attribute to differentiate from other components | |
| display | String | 'b' | Defines the display type. Accepts ib and b. |
| password | String | '' | Defines the password text. |
| hasLabel | Boolean | false | Defines if the label is shown |
| label | String | '' | Defines the label text. It only works when hasLabel is passed with the value true. |
| hasDescriptions | Boolean | false | Defines if the description is shown |
| descriptions | Array (Strings) | Defines the descriptions text. It only works when hasLabel is passed with the value true. Accepts an array of 5 strings. | |
| width | Number | 56 | Defines the columns width. |
| gap | Number | 10 | Defines the columns gap. |
| labelGap | Number | 10 | Defines the label gap. It only works when hasLabel is passed with the value true. |
| statusColor | String | '#999999' | Defines the status color. Accepts Color name and Hex |
| validStatusColor | String | '#72f258' | Defines the valid status color. Accepts Color name and Hex |
| titleColor | String | '#000000' | Defines the title color. Accepts Color name and Hex |
| descriptionColor | String | '#000000' | Defines the description color. Accepts Color name and Hex |
| fontFamily | String | "'Lato', sans-serif" | Defines the font-family |
| fontSize | String | '1.6em' | Defines the columns font-size |
| fontSizeLabel | String | '.9em' | Defines the label font-size |
| fontSizeDescription | String | '.8em' | Defines the descriptins font-size |
| fontWeight | Number | 200 | Defines the label font-weight |
Table of Contents
