Zustände
Passwortfeld mit Anzeigen-Schalter, Fehler und deaktiviert.
Formulare
Password field (Figma: Password) with a show/hide toggle (aria-pressed). strength=True adds the four-segment meter with a live message (weak, medium, strong; event tc-strength) for new passwords; checklist=True lists the rules. The check runs in the browser only and never replaces server-side validation.
Passwortfeld mit Anzeigen-Schalter, Fehler und deaktiviert.
Vier-Segment-Anzeige mit Live-Meldung und optionaler Regel-Checkliste für neue Passwörter.
Mindestens 12 Zeichen.
Mindestens 12 Zeichen.
Ereignis tc-strength (level, score) und toggleVisibility(); Texte als Attribute übersetzbar.
Stärke: –
| Option | Standard | Werte | Beschreibung |
|---|---|---|---|
label | '' | – | Visible label text. |
required | False | – | Mark as required: native required attribute plus a red asterisk. |
optional | False | – | Show the "optional" marker after the label (ignored when required). |
label_icon | '' | – | Explanation shown as a help icon with tooltip after the label. |
hide_label | False | – | Keep the label for assistive technology only. |
help | '' | – | Hint below the control (Figma: Hint / Help Text). |
error | '' | – | Error message or list of messages (e.g. Django field.errors); sets the error state, aria-invalid and aria-describedby. Replaces the hint while shown. |
state | '' | Validation state without an error message: success or warning colour the border and the hint. | |
name | '' | – | Form field name (Django html_name). |
value | 'None' | – | Current value; dates and numbers are converted to their ISO/text form. |
disabled | False | – | Disable the control. |
readonly | False | – | Read-only: value stays selectable and is submitted. |
placeholder | '' | – | Placeholder text (never a replacement for the label). |
size | 'md' | Height: sm 28, md 36, lg 44 px (match the buttons in the same row). | |
strength | False | – | Show the strength meter and message (sets autocomplete=new-password). |
checklist | False | – | Show the rule checklist (length, upper/lower case, digit, symbol). |
min_length | 12 | – | Minimum length used by the meter and checklist. |
Zusätzliche Attribute (z. B. class, aria-*, data-*) und HTMX-Kurzformen (get, post, get_url, post_url, target, swap, trigger, confirm) werden an das Element „root“ durchgereicht.