Skip to main content

PasswordInput

Password input widget for capturing sensitive text with masked display.

Signature

def PasswordInput(
label: str,
key: str = None,
hint: str = None,
required: bool = True,
full_width: bool = False,
lowercase_required: bool = False,
uppercase_required: bool = False,
special_required: bool = False,
digit_required: bool = False,
min_length: int = None,
max_length: int = None,
size: int = None,
pattern: str = None,
autocomplete: str = None,
placeholder: str = None,
disabled: bool = False,
secret: bool = False,
errors: Union[List[str], str] = None
)

Parameters

NameDescriptionTypeDefault
label (required)Text label displayed above the input.strNone
keyIdentifier for the widget, defaults to label if not provided.strNone
hintHelp text displayed below the input.strNone
requiredWhether the input must be filled before proceeding.boolTrue
full_widthWhether the input should take up the full width of its container.boolFalse
lowercase_requiredWhether the input must contain at least one lowercase letter.boolFalse
uppercase_requiredWhether the input must contain at least one uppercase letter.boolFalse
special_requiredWhether the input must contain at least one special character.boolFalse
digit_requiredWhether the input must contain at least one digit.boolFalse
min_lengthMinimum number of characters required.intNone
max_lengthMaximum number of characters allowed.intNone
sizeSize of the input.intNone
patternRegular expression pattern for input validation.strNone
autocompleteAutocomplete attribute for the input.strNone
placeholderPlaceholder text displayed when the input is empty.strNone
disabledWhether the input is non-interactive.boolFalse
secretWhether the input is a secret (e.g., for passwords).boolFalse
errorsPre-defined validation error messages to display.Union[List[str], str]None