Password fields are a special type of text input that hides the individual characters on the screen as they are typed. Material-UI TextField components support this type of field by changing the value of the type property.
Password fields
How to do it...
Here's a simple example that changes a regular text input into a password input that prevents the value from displaying on the screen:
import React, { useState } from 'react';
import TextField from '@material-ui/core/TextField';
export default function PasswordFields() {
const [password, setPassword] = useState('12345');
const onChange = e => {
setPassword(e.target.value);
};
return (
<TextField
type="password"...