Typen
Präfix, Suffix, beides und angehängter Kopieren-Button wie in Figma.
https://
€ netto
Formulare
Input with fixed add-ons before or after the value, e.g. a protocol, a domain, a currency or a unit (Figma: Type Prefix, Suffix, Both, Button). Add-ons are announced through aria-describedby. The prefix/suffix slots accept custom add-on markup; copy=True adds a copy-to-clipboard button (event tc-copy).
Präfix, Suffix, beides und angehängter Kopieren-Button wie in Figma.
Fehler, deaktiviert und kleine Größe einer Eingabegruppe.
| 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 (Django html_name). |
value | 'None' | – | Current value; dates and numbers are converted to their ISO/text form. |
disabled | False | – | Disable the control. |
readonly | False | – | 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. |
copy | False | – | Attached button copies the value to the clipboard. |
mono | True | – | Monospaced value and add-ons (Figma default for technical values). |
{% slot prefix %} | – | Slot | Benannter Inhaltsbereich. |
{% slot suffix %} | – | Slot | Benannter Inhaltsbereich. |
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.