Ü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

Input Group

Typen

Präfix, Suffix, beides und angehängter Kopieren-Button wie in Figma.

Code<div class="tc-stack" style="--tc-gap: 20px; max-width: 400px"> {% tc_input_group# label="Adresse" name="url" prefix="https://" value="app.example.com" %} {% tc_input_group# label="Subdomain" name="subdomain" suffix=".example.com" value="www" %} {% tc_input_group# label="Betrag" name="amount" type="number" prefix="€" suffix="netto" value="1250.00" step="0.01" %} {% tc_input_group# label="Öffentlicher Schlüssel" name="public_key" value="AbCdEfGhIjKlMnOpQrStUv0=" readonly=True copy=True button_label="Kopieren" %} </div>

Zustände

Fehler, deaktiviert und kleine Größe einer Eingabegruppe.

Code<div class="tc-stack" style="--tc-gap: 20px; max-width: 400px"> {% tc_input_group# label="Betrag" name="amount_error" prefix="€" suffix="netto" value="-20" error="Der Betrag muss größer als 0 sein." %} {% tc_input_group# label="Betrag" name="amount_disabled" prefix="€" suffix="netto" value="1250.00" disabled=True %} {% tc_input_group# label="Port" name="port" size="sm" prefix="10.0.4.17:" value="8443" %} </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.
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.
disabledFalse–Disable the control.
readonlyFalse–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).
type'text'Native input type.
prefix''–Text add-on before the value, e.g. "https://".
suffix''–Text add-on after the value, e.g. ".example.com" or "netto".
button_label''–Label of an attached action button (Figma: Type=Button).
button_icon''–Carbon icon of the attached action button.
copyFalse–Attached button copies the value to the clipboard.
monoTrue–Monospaced value and add-ons (Figma default for technical values).
{% slot prefix %}–SlotBenannter Inhaltsbereich.
{% slot suffix %}–SlotBenannter Inhaltsbereich.

Verwendung

{% load components tomcom_theme %} {% tc_input_group label="…" required="…" %}…{% endtc_input_group %} {% tc_input_group# %} {# 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.