PasswordInput

view
size
placeholder
label
note
validationState
errorMessage
errorPlacement
disabled
hasClear
import {PasswordInput} from '@gravity-ui/uikit';

TextInput for typing passwords and other sensitive information. It can be rendered with copy and reveal buttons for more convinient usage.

Copy button

This button allows users to easily copy the input value to their clipboard. You can hide this button with hideCopyButton boolean prop.

<PasswordInput hideCopyButton={true} />

Reveal button

The hideRevealButton prop allows users to toggle the visibility of the password.

<PasswordInput hideRevealButton={true} />

Properties

TextInput properties, with some exceptions and additions:

  • type is omitted;
NameDescriptionTypeDefault
hideCopyButtonShow copy buttonbooleanfalse
hideRevealButtonShow reveal buttonbooleanfalse
showCopyTooltipDetermines whether to display the tooltip for the copy buttonbooleanfalse
showRevealTooltipDetermines whether to display the tooltip for the reveal buttonbooleanfalse
revealValueDetermines the visibility state of the password input fieldbooleanfalse
onRevealValueUpdateA callback function that is invoked whenever the revealValue state changesfunction