1.0.0 • Published 3 years ago
@craydel-v3/craydel-password-field
Licence
MIT
Version
1.0.0
Deps
2
Size
12 kB
Vulns
0
Weekly
0
CraydelPasswordField
Installation
Get the latest version by NPM:
$ npm i @craydel-v3/craydel-password-field
Component Import
Import the module chosen directly in your component
<script>
import CraydelPasswordField from "@craydel-v3/craydel-password-field/src/CraydelPasswordField.vue";
export default {
components: {CraydelPasswordField}
}
</script>
Props
| Name | Type | Default | Description |
|---|---|---|---|
| id | string | random ID | Sets the DOM id on the component. |
| placeholder | string | 'Enter password' | Sets the component's placeholder text. |
| is-required | boolean | false | Puts component in a required state. |
| required-error | string | 'Field is required' | Puts the component in an error state and passes through the custom required error message. |
| max-length | number | 100 | The maximum number of characters allowed in the field. |
| max-length-error | string | 'Value cannot be longer than max-length characters' | Puts the component in an error state and passes through a custom max length error message. |
Usage
An example showing a password field that shows a password strength meter and a confirm password field.
<craydel-password-field show-confirm-field show-password-strength></craydel-password-field>