Varianten
Feldlabel mit Pflichtmarkierung, optionalem Hinweis, Label-Icon und Hinweiszeile.
Formulare
Label row used by every form control: label, red asterisk for required fields, help icon with tooltip and the "optional" marker, optionally followed by a hint line. The default slot holds a custom control, so <tc-field-label> also frames native or third-party widgets. With for_id the label is a light-DOM <label for> that labels the referenced control.
Feldlabel mit Pflichtmarkierung, optionalem Hinweis, Label-Icon und Hinweiszeile.
das Feldlabel rahmt ein beliebiges natives Element; for_id verknüpft das Label.
| 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. |
for_id | '' | – | Id of the labelled control (renders a light <label for>). |
tag | 'label' | Kept for compatibility; the element always renders its own label row. | |
hint | '' | – | Hint line below the label (Figma: Hinweis). |
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.