UI: PasswordField
Ein Passwortfeld mit einem Knopf, der das Passwort zeigt oder verbirgt. Importiere die Token-Datei einmal (@pithyx/ui/tokens.css) und umschließe die App mit UiProvider; siehe @pithyx/ui.
Beim Build aus den TSDoc-Kommentaren von @pithyx/ui 1.0.0-rc.9 erzeugt; der Text unter den Überschriften ist der Kommentar im Quelltext und bleibt Englisch.
Schnittstellen
Abschnitt betitelt „Schnittstellen“PasswordFieldProps
Abschnitt betitelt „PasswordFieldProps“The props of PasswordField; autoComplete tells password managers what to do.
Erweitert
Abschnitt betitelt „Erweitert“Omit<TextFieldProps,"type"|"trailing">
Eigenschaften
Abschnitt betitelt „Eigenschaften“label: ReactNode;The visible label, also the accessible name.
Geerbt von
Abschnitt betitelt „Geerbt von“description?
Abschnitt betitelt „description?“optional description?: ReactNode;A hint below the input, announced with it.
Geerbt von
Abschnitt betitelt „Geerbt von“errorMessage?
Abschnitt betitelt „errorMessage?“optional errorMessage?: ReactNode;The text shown while the field is invalid (isInvalid or a failed validate).
Geerbt von
Abschnitt betitelt „Geerbt von“placeholder?
Abschnitt betitelt „placeholder?“optional placeholder?: string;A hint inside the empty input; never a replacement for the label.
Geerbt von
Abschnitt betitelt „Geerbt von“className?
Abschnitt betitelt „className?“optional className?: string;Extra class names for the field, added after its own.
Geerbt von
Abschnitt betitelt „Geerbt von“inputClassName?
Abschnitt betitelt „inputClassName?“optional inputClassName?: string;Extra class names for the input element.
Geerbt von
Abschnitt betitelt „Geerbt von“autoCapitalize?
Abschnitt betitelt „autoCapitalize?“optional autoCapitalize?: "none" | "characters";“none” for user names and codes, so phones do not capitalize the first letter.
Geerbt von
Abschnitt betitelt „Geerbt von“Omit.autoCapitalize;autoComplete
Abschnitt betitelt „autoComplete“autoComplete: 'current-password' | 'new-password';current-password to sign in, new-password to set one.
Überschreibt
Abschnitt betitelt „Überschreibt“Omit.autoComplete;Funktionen
Abschnitt betitelt „Funktionen“PasswordField()
Abschnitt betitelt „PasswordField()“function PasswordField(props): Element;A password input with a button that shows or hides the password. The button’s label comes from the package’s own
texts in the language of the nearest UiProvider.
Parameter
Abschnitt betitelt „Parameter“| Parameter | Typ | Beschreibung |
|---|---|---|
props |
PasswordFieldProps |
The props of TextField without type and trailing, plus the required autoComplete. |
Rückgabewert
Abschnitt betitelt „Rückgabewert“Element
The password field.