# PasswordInput
### Intro
The PasswordInput component is usually used with [NumberKeyboard](#/en-US/number-keyboard) Component.
### Install
``` javascript
import Vue from 'vue';
import { PasswordInput, NumberKeyboard } from 'vant';
Vue.use(PasswordInput).use(NumberKeyboard);
```
## Usage
### Basic Usage
```html
```
```javascript
export default {
data() {
return {
value: '123',
showKeyboard: true
};
},
methods: {
onInput(key) {
this.value = (this.value + key).slice(0, 6);
},
onDelete() {
this.value = this.value.slice(0, this.value.length - 1);
}
}
}
```
### Custom length
```html
```
### Without mask
```html
```
## API
### Props
| Attribute | Description | Type | Default | Version |
|------|------|------|------|------|
| value | Password value | *string* | `''` | - |
| length | Maxlength of password | *number* | `6` | - |
| mask | Whether to mask value | *boolean* | `true` | - |
| focused | Whether to show focused cursor | *boolean* | `false` | 2.1.8 |
| info | Bottom info | *string* | - | - |
| error-info | Bottom error info | *string* | - | - |
| gutter | Gutter of input | *string \| number* | `0` | - |
### Events
| Event | Description | Arguments |
|------|------|------|
| focus | Triggered when input get focused | - |