Assuming you are referring to passwords on a (local) account, creating a toggle won't help you very much as passwords are hashed before they are stored in the database. You cannot access the password anymore after it has been saved in the database.
Mendix offers the option to display a textbox as a password, and mask the string accordingly. You could disable this. (Docs section 2.8)
If this is not an option and you are using a microflow to generate the password, you could show the password in a popup message box. Remember to never store the password unencrypted.
Hi Ben, problaby with the Attribute Helper or Set Attribute widget you could toggle the type of the input from password to text: