Ausrichtung
Checkbox-Gruppe vertikal mit Hilfetext und horizontal mit Fehlertext.
Formulare
Fieldset with a legend and several <tc-checkbox> children for multiple choice (Figma: Checkbox Group). The group is form-associated and submits every checked value under name; required means at least one. Help and error text belong to the whole group.
Checkbox-Gruppe vertikal mit Hilfetext und horizontal mit Fehlertext.
Checkboxen mit Hilfetext im Slot und deaktivierter Option.
tc-checkbox-group mit tc-checkbox-Kindern; die Gruppe sendet alle gewählten Werte unter einem Namen.
| 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 shared by all options. |
options | '()' | – | Options: Django choices, dictionaries (value, label, help, disabled, id) or "value=Label|value=Label". Alternatively place tc_checkbox/tc_radio tags in the slot. |
orientation | 'vertical' | Stack options vertically (gap 8) or in a row (gap 24). | |
disabled | False | – | Disable every option. |
size | 'md' | Box and text size: sm 14 px / Body SM, md 16 px / Body MD, lg 20 px / Body LG. | |
value | 'None' | – | Checked values: list or "a,b". |
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.