Ü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

Textarea

Zustände

Mehrzeiliges Textfeld mit Hinweis, Zähler, Fehler, deaktiviert und schreibgeschützt.

Code<div class="tc-stack" style="--tc-gap: 20px; max-width: 480px"> {% tc_textarea# label="Notiz" name="note" optional=True value="Zugang für das Notebook von E. Musterfrau, gültig bis Projektende." counter=True maxlength=500 %} {% tc_textarea# label="Begründung" name="reason" placeholder="Wofür wird der Zugang benötigt?" required=True error="Bitte eine Begründung angeben." %} {% tc_textarea# label="Notiz" name="note_disabled" value="Vom System erzeugt." disabled=True rows=2 %} {% tc_textarea# label="Öffentlicher Schlüssel" name="key" value="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKeyOnly max@example.com" readonly=True mono=True rows=2 %} </div>

Automatisch wachsend

resize="auto" passt die Höhe an den Inhalt an.

Code<div style="max-width: 480px"> {% tc_textarea# label="Kommentar" name="comment" rows=2 resize="auto" placeholder="Kommentar schreiben …" help="Das Feld wächst mit dem Text." %} </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).
monoFalse–Monospaced value for technical values (hostnames, IPs, keys).
counterFalse–Show a character counter (Figma: Count); combine with maxlength.
rows4–Visible text lines.
resize'vertical'Manual vertical resize, none, or auto-grow with content.

Verwendung

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