Deviopath › React

Show / Hide Password

Medium · Forms

Add a "Show" button next to the password input.

- Clicking "Show" changes the input type to "text" and the button text to "Hide".

- Clicking "Hide" changes it back to "password" and "Show".

- The typed value must stay the same when switching.

- The button is disabled while the input is empty.

Next: Tabs