PasswordInput
Capture password from user with option to toggle visibility
Import
Source
Docs
Package
Usage
Use PasswordInput when you need to capture password from user.
Component provides option to toggle password visibility, if you do not this feature, use TextInput component with type="password"
.
Component supports all props from Input and InputWrapper components.
Password must include at least one letter, number and special character
Radius
xs
sm
md
lg
xl
Size
xs
sm
md
lg
xl
Change visibility toggle icon
You can change visibility toggle icon with visibilityToggleIcon
prop.
Pass react component that accepts reveal
and size
props:
Strength meter example
Password strength meter example with Progress and Popover components:
Strong password should include letters in lower and uppercase, at least 1 number, at least 1 special symbol
Focus behavior
You can control focus behavior with toggleTabIndex
.
If prop is 0
then toggle control will be focusable with tab key:
Controlled
Invalid state and error
Invalid password
Disabled state
In disabled state button to toggle password visibility id not displayed:
With icon
Get input ref
Accessibility
Provide aria-label
in case you use component without label for screen reader support:
Feedback
Your feedback is most valuable contribution to the project, please share how you use Mantine, what features are missing and what is done good
Leave feedback