Ü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

Toast

Töne nebeneinander

Neutral, Info, Success, Warning und Danger – statisch gerendert und live per TC.toast.

Code<div class="tc-stack" style="--tc-gap: 16px"> <div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px"> {% tc_toast# tone="neutral" message="Config in die Zwischenablage kopiert" %} {% tc_toast# tone="info" message="Neue Version 4.2 ist verfügbar" %} {% tc_toast# tone="success" message="Record www.example.com gespeichert" %} {% tc_toast# tone="warning" message="Zertifikat für example.com läuft in 9 Tagen ab" %} {% tc_toast# tone="danger" message="Export fehlgeschlagen – bitte erneut versuchen" %} </div> <div class="tc-cluster"> {% tc_button# variant="outlined" size="sm" label="Neutral" data-demo-tone="neutral" %} {% tc_button# variant="outlined" size="sm" label="Info" data-demo-tone="info" %} {% tc_button# variant="outlined" size="sm" label="Success" data-demo-tone="success" %} {% tc_button# variant="outlined" size="sm" label="Warning" data-demo-tone="warning" %} {% tc_button# variant="outlined" size="sm" label="Danger" data-demo-tone="danger" %} </div> </div> <script> document.addEventListener('click', function (event) { var button = event.target.closest('[data-demo-tone]'); if (!button) return; var texts = {neutral: 'Config in die Zwischenablage kopiert', info: 'Neue Version 4.2 ist verfügbar', success: 'Record www.example.com gespeichert', warning: 'Zertifikat für example.com läuft in 9 Tagen ab', danger: 'Verbindung zu 10.0.2.15 fehlgeschlagen'}; TC.toast(texts[button.dataset.demoTone], {tone: button.dataset.demoTone}); }); </script>

Titel, Aktion und Fortschritt

fette Titelzeile, eine Aktion als Link („Rückgängig“), Restzeit als Linie.

Code<div class="tc-stack" style="--tc-gap: 12px"> {% tc_toast tone="success" message="Zugang „Notebook M. Mustermann“ gelöscht" timeout=0 %} {% slot action %}{% tc_button# variant="link" size="sm" label="Rückgängig" %}{% endslot %} {% endtc_toast %} {% tc_toast# tone="danger" title="Import abgebrochen" message="Zeile 14: ungültige IP-Adresse 10.0.300.1" %} {% tc_toast# tone="info" title="Wartung" message="Sonntag, 1. Dezember 2026, 06:00–07:00 Uhr" progress=True %} {% tc_toast# tone="neutral" message="Export wird erstellt …" loading=True %} </div>

Live und Laden

TC.toast mit Aktion, Fortschrittslinie und Ladezustand; höchstens drei Toasts gleichzeitig.

Code<div class="tc-cluster"> {% tc_button# variant="outlined" label="Erfolg mit Aktion" data-demo-toast="success" %} {% tc_button# variant="outlined" label="Fehler anzeigen" data-demo-toast="danger" %} {% tc_button# variant="outlined" label="Export starten" data-demo-toast="loading" %} </div> <script> document.addEventListener('click', function (event) { var button = event.target.closest('[data-demo-toast]'); if (!button) return; var kind = button.dataset.demoToast; if (kind === 'loading') { var toast = TC.toast('Export wird erstellt …', {tone: 'info', loading: true}); setTimeout(function () { toast.loading = false; toast.tone = 'success'; toast.message = 'Export bereit: zonen-2026-11.csv'; }, 2500); return; } if (kind === 'danger') TC.toast('Verbindung zu 10.0.2.15 fehlgeschlagen', {tone: 'danger', title: 'Nameserver nicht erreichbar'}); else TC.toast('Record www.example.com gespeichert', {tone: 'success', progress: true, action: {label: 'Rückgängig'}}); }); </script>

API

OptionStandardWerteBeschreibung
tone'neutral'Colour, icon and urgency: neutral, info, success, warning, danger.
message''–Text when the default slot is empty.
title''–Optional bold line above the message.
timeout'None'–Auto-hide delay in ms inside the toast region; default 5000, 0 for warning/danger.
dismissible'None'–Close button; default only for toasts that do not hide themselves.
close_label''–Accessible name of the close button (default "Close").
progressFalse–Show a line counting down the auto-hide delay.
loadingFalse–Spinner instead of the icon; no auto-hide or close until loading is removed.
{% slot action %}–SlotBenannter Inhaltsbereich.

Verwendung

{% load components tomcom_theme %} {% tc_toast tone="…" message="…" %}…{% endtc_toast %} {% tc_toast# %} {# 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.