<PasswordInput> works like the <TextInput> but overwrites its type prop to password or text in accordance with a visibility button, hidden by default.

Password Input


Use it like a <TextInput>:

import { PasswordInput } from 'react-admin';

<PasswordInput source="password" />


Prop Required Type Default Description
initiallyVisible Optional boolean false Whether the password should initially be shown

<PasswordInput> also accepts the common input props.


It is possible to change the default behavior and display the value by default via the initiallyVisible prop:

import { PasswordInput } from 'react-admin';
<PasswordInput source="password" initiallyVisible />

Password Input (visible)

Disabling Autocomplete

Set the autocomplete attribute by injecting an input props:

<PasswordInput source="password" inputProps={{ autocomplete: 'current-password' }} />