<PasswordInput>

<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

Usage

Use it like a <TextInput>:

import { PasswordInput } from 'react-admin';

<PasswordInput source="password" />

Props

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

<PasswordInput> also accepts the common input props.

initiallyVisible

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' }} />