Skip to content

PasswordInput

Password input with a toggle to show or hide the entered value.

<ControlledPasswordInput {...args} />
<ControlledPasswordInput {...args} />
<ControlledPasswordInput {...args} />
<ControlledPasswordInput {...args} />
<ControlledPasswordInput {...args} />
<ControlledPasswordInput {...args} />
Must be at least 8 characters with a number and symbol.
<ControlledPasswordInput {...args} />
<div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
<ControlledPasswordInput label="Small" placeholder="Password" size="sm" />
<ControlledPasswordInput
label="Medium"
placeholder="Password"
size="md"
/>
<ControlledPasswordInput label="Large" placeholder="Password" size="lg" />
</div>
<ControlledPasswordInput {...args} />
<ControlledPasswordInput {...args} />
<ControlledPasswordInput {...args} />

Password input with a toggle to show or hide the entered value.

PropTypeDefaultDescription
label*stringField label.
styleCSSPropertiesInline styles applied to the field root, or to the input wrapper when the input is inside an InputGroup.
refRef<HTMLInputElement>Ref forwarded to the input element.
classNamestringAdditional CSS class names applied to the field root, or to the input wrapper when the input is inside an InputGroup.
onFocus(event: FocusEvent<HTMLInputElement>) => voidCalled when the input gains focus.
onBlur(event: FocusEvent<HTMLInputElement>) => voidCalled when the input loses focus.
onChange*( value: string, event: ChangeEvent<HTMLInputElement> | null, ) => voidCalled with the next string value.
onKeyDown(event: KeyboardEvent<HTMLInputElement>) => voidKeyboard event handler for the input.
statusInputStatusStatus displayed on the field.
data-testidstringTest ID applied to the input element.
isDisabledbooleanfalseWhether the input is disabled.
isLoadingbooleanfalseWhether the input is loading.
size"sm" | "md" | "lg"Visual size.
value*stringControlled input value.
placeholderstringPlaceholder text.
autoCompletestringHTML autocomplete hint for the browser.
descriptionReactNodeSupporting text rendered below the label.
hasAutoFocusbooleanfalseWhether to focus the input on mount.
htmlNamestringHTML name attribute.
isLabelHiddenbooleanfalseWhether to visually hide the label.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip shown beside the label.
onEnter() => voidCalled when Enter is pressed.
isOptionalboolean
isRequiredboolean