Skip to content

PasswordInput

Used to collect passwords.

Please enter your password
// Import component
import { PasswordInput } from '@fintech-sandpit/ui/react';
// Import styles (optional). Please note that you need to import the styles
// for Field and PasswordInput components since the PasswordInput component
// is using Field component.
import '@fintech-sandpit/ui/style/components/field.css';
import '@fintech-sandpit/ui/style/components/password.css';
return (
<PasswordInput
label="Password"
hint="Please enter your password"
error="Invalid password"
/>
);
NameTypeRequiredDefaultDescription
valuestring—Controlled value of the text input
defaultValuestring—Default (uncontrolled) value of the text input
namestringpasswordName of the password input
orientationOrientationverticalOrientation of the text input
sizeFieldSizemdSize of the text input
revealablebooleanfalseWhether the password input is revealable
labelstring—Label of the text input
hintstring—Helper text of the text input
errorstring—Error text of the text input
requiredbooleanfalseWhether the text input is required
invalidbooleanfalseWhether the text input is invalid
readOnlybooleanfalseWhether the text input is read only
disabledbooleanfalseWhether the text input is disabled
placeholderstring—Placeholder of the text input
NameTypeDescription
onValueChange(value: string) => voidEvent handler for when the value changes
type FieldSize = 'sm' | 'md' | 'lg';
type Orientation = 'horizontal' | 'vertical';