MtPasswordField component provides a secure input for passwords with optional visibility toggle.
Import
Props
v-model binding for the password value.
A label for the password field.
Placeholder text for the input.
Disables the password field.
Enables the password visibility toggle button.
Marks the field as required.
The name attribute for the input.
Help text with additional information.
Deprecated: Use slot “hint” instead.
Error object with code and detail properties.
The size of the field.
Toggles inheritance visualization.
Determines if the field is inheritable.
Disables the inheritance toggle.
Events
Emitted when the password value changes.
Emitted when input loses focus.
Emitted when Enter key is pressed.
Emitted when inheritance is restored.
Emitted when inheritance is removed.
Slots
Content before the input.
Content after the input.
Additional hint content.
Usage
Basic Password Field
Without Visibility Toggle
With Submit on Enter
Password Confirmation
Small Size
Accessibility
- Uses native password input type
- Visibility toggle has descriptive aria-label (“Show password” / “Hide password”)
- Label properly associated with input
- Error messages accessible via ARIA
- Focus visible outline for keyboard navigation
- Enter key triggers submit event