Übersicht FarbenTypografieAbstände & RasterIcons ButtonButton GroupIcon ButtonLink CheckboxCheckbox GroupChipChip GroupComboboxDate PickerFieldField LabelFieldsFile UploadFormForm SectionInputInput GroupOTP InputPasswordRadioRadio GroupRange SliderReset ButtonSave ButtonSearchSegmented ControlSelectSliderSwitchTextareaTime Picker AvatarAvatar GroupBadgeChartCode BlockCopy ValueData TableInline StatKey ValueList GroupList RowsMeta ItemQR CodeStatStat StripTableTag AlertEmpty StateGuideLive StatusMessagesProgressSkeletonToast DialogDrawerDropdownMenuMenu ItemPopoverTooltip BreadcrumbContent NavigationDate NavigationPaginationSidebarStepperTabsTheme SwitchTopbar AccordionAccordion ItemApp ShellCardDividerFooterPage HeaderSection HeaderSplit Panel DashboardListeFormularDetailansichtEinstellungenMehrschritt-AssistentLeerer StartLoginFehlerseite IconsMusterAdmin

Field Label

Varianten

Feldlabel mit Pflichtmarkierung, optionalem Hinweis, Label-Icon und Hinweiszeile.

Code<div class="tc-stack" style="--tc-gap: 20px"> {% tc_field_label# label="Methode" %} {% tc_field_label# label="Notiz" optional=True %} {% tc_field_label# label="Zertifikat" required=True label_icon="PEM-Datei mit vollständiger Zertifikatskette." %} {% tc_field_label# label="Zeitraum" hint="Höchstens 90 Tage, gezählt ab heute." %} </div>

Eigenes Steuerelement

das Feldlabel rahmt ein beliebiges natives Element; for_id verknüpft das Label.

Code<div style="max-width: 360px"> {% tc_field_label label="Farbe der Markierung" for_id="color-example" optional=True hint="Wird in der Übersicht als Punkt angezeigt." %} <input id="color-example" type="color" value="#146ef5" style="width: 48px; height: 36px; padding: 2px; border: 1px solid var(--tc-border-strong); border-radius: var(--tc-radius-sm); background: var(--tc-bg-input)"> {% endtc_field_label %} </div>

API

OptionStandardWerteBeschreibung
label''–Visible label text.
requiredFalse–Mark as required: native required attribute plus a red asterisk.
optionalFalse–Show the "optional" marker after the label (ignored when required).
label_icon''–Explanation shown as a help icon with tooltip after the label.
hide_labelFalse–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).

Verwendung

{% load components tomcom_theme %} {% tc_field_label label="…" required="…" %}…{% endtc_field_label %} {% tc_field_label# %} {# inline form without content #}

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.