Ü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

Badge

Töne und Betonung

Subtle als Standard, Solid für hohe Aufmerksamkeit

Code<div class="tc-stack" style="--tc-gap: 12px"> <div class="tc-cluster"> {% tc_badge# label="Neutral" %} {% tc_badge# label="In Prüfung" tone="info" %} {% tc_badge# label="Intern" tone="secondary" %} {% tc_badge# label="Aktiv" tone="success" %} {% tc_badge# label="Läuft ab" tone="warning" %} {% tc_badge# label="Gesperrt" tone="danger" %} </div> <div class="tc-cluster"> {% tc_badge# label="Neutral" emphasis="solid" %} {% tc_badge# label="Neu" tone="info" emphasis="solid" %} {% tc_badge# label="Intern" tone="secondary" emphasis="solid" %} {% tc_badge# label="Aktiv" tone="success" emphasis="solid" %} {% tc_badge# label="Läuft ab" tone="warning" emphasis="solid" %} {% tc_badge# label="Gesperrt" tone="danger" emphasis="solid" %} </div> </div>

Größen und Formen

SM 16, MD 20, LG 24 px, eckig oder als Pille

Code<div class="tc-stack" style="--tc-gap: 12px"> <div class="tc-cluster"> {% tc_badge# label="Aktiv" tone="success" size="sm" %} {% tc_badge# label="Aktiv" tone="success" size="md" %} {% tc_badge# label="Aktiv" tone="success" size="lg" %} {% tc_badge# label="Aktiv" tone="success" size="sm" shape="pill" %} {% tc_badge# label="Aktiv" tone="success" size="md" shape="pill" %} {% tc_badge# label="Aktiv" tone="success" size="lg" shape="pill" %} </div> <div class="tc-cluster"> {% tc_badge# type="count" count=3 size="sm" %} {% tc_badge# type="count" count=12 tone="info" %} {% tc_badge# type="count" count=128 tone="danger" emphasis="solid" shape="pill" label="128 ungelesene Meldungen" %} {% tc_badge# type="count" count=7 size="lg" tone="secondary" emphasis="solid" %} </div> </div>

Status und Punkt

Punkt mit Text für Tabellen, reiner Punkt nur mit zugänglichem Namen

Code<div class="tc-stack" style="--tc-gap: 12px"> <div class="tc-cluster" style="--tc-gap: 20px"> {% tc_badge# type="status" label="Verbunden" tone="success" %} {% tc_badge# type="status" label="Wartung" tone="warning" %} {% tc_badge# type="status" label="Fehler" tone="danger" %} {% tc_badge# type="status" label="Getrennt" %} {% tc_badge# type="status" label="Live" tone="info" pulse %} </div> <div class="tc-cluster" style="--tc-gap: 20px"> {% tc_badge# type="dot" tone="success" label="Online" %} {% tc_badge# type="dot" tone="danger" size="lg" label="Neue Fehler" pulse %} {% tc_badge# label="Live" tone="success" shape="pill" pulse %} {% tc_badge# label="Aufnahme" tone="danger" emphasis="solid" shape="pill" pulse %} </div> </div>

Im Einsatz

Zähler am Icon Button und Status in einer Liste

Zertifikat example.com
Code<div class="tc-cluster" style="--tc-gap: 24px"> {% tc_icon_button icon="notification" label="Benachrichtigungen" variant="outline" %}{% tc_badge# type="count" count=4 size="sm" shape="pill" tone="danger" emphasis="solid" label="4 neue" %}{% endtc_icon_button %} <span class="tc-text-body">Zertifikat <code>example.com</code> {% tc_badge# label="Läuft in 12 Tagen ab" tone="warning" %}</span> </div>

HTML und JS-API

<tc-badge> im Markup; die count-Property kappt automatisch auf „99+“.

Aktiv count += 50
Code<div class="tc-cluster"> <tc-badge tone="success">Aktiv</tc-badge> <tc-badge type="status" tone="warning" label="Wartung"></tc-badge> <tc-badge id="raw-count" type="count" count="8" tone="danger" emphasis="solid" shape="pill" label="neue Meldungen"></tc-badge> <tc-button id="raw-count-up" variant="outlined" size="sm">count += 50</tc-button> </div> <script> (function () { var badge = document.getElementById('raw-count'); document.getElementById('raw-count-up').addEventListener('click', function () { badge.count = badge.count + 50; }); })(); </script>

API

OptionStandardWerteBeschreibung
label''–Text (badge, status) or accessible name (count, dot).
type'badge'Badge (text), count (mono number), status (dot + text) or dot.
tone'neutral'Colour tone.
emphasis'subtle'Subtle tint or solid fill (badge, count).
size'md'Height: sm 16, md 20, lg 24 px (all types share one height per size).
shape'rounded'Rounded (4 px) or pill (badge, count).
count'None'–Counter value for type count.
max99–Counts above this show as "99+"; 0 disables the cap.
pulseFalse–Animated halo for live or new hints (dot, status, count). Use sparingly.
icon''–Leading Carbon icon (type badge only).

Verwendung

{% load components tomcom_theme %} {% tc_badge label="…" type="…" %}…{% endtc_badge %} {% tc_badge# %} {# 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.