Daten
tc_stat_strip
Status bar above dashboards: 4-6 tc_stat tiles side by side, separated by lines instead of cards; wraps into rows on small screens. Pass items (dicts with tc_stat options) or tiles in the default slot; the actions slot holds e.g. a refresh icon button.
Stat Strip
Übersicht / Daten / Stat Strip In Figma
Beispiele 3 API Verwendung
Code {% tc_stat_strip label="Status der Warteschlange" %}
{% tc_stat# label="Threads" value="0 / 5" unit="belegt" status="active" %}
{% tc_stat# label="Warteschlange" value="0" unit="Aufträge" %}
{% tc_stat# label="Erledigt" value="34.381" unit="heute" %}
{% tc_stat# label="Fehler" value="76" unit="heute" status="error" %}
{% tc_stat# label="Übermittlungen" value="0" unit="offen" %}
{% slot "actions" %}{% tc_icon_button# icon="renew" label="Aktualisieren" size="sm" %}{% endslot %}
{% endtc_stat_strip %}
Konvertierungen 1.284 heute +12 %
Code {% tc_stat_strip label="Konvertierung" %}
{% tc_stat# label="Konvertierungen" value="1.284" unit="heute" delta="+12 %" delta_rating="good" %}
{% tc_stat# label="Wartend" value="312" unit="Dateien" status="warning" delta="+48 %" delta_rating="bad" %}
{% tc_stat# label="Fehler" value="7" unit="heute" %}
{% tc_stat# label="Ø Dauer" value="2,4 s" unit="pro Datei" %}
{% endtc_stat_strip %}
Code <tc-stat-strip label="Server">
<tc-stat label="Online" value="18" unit="von 20" status="active"></tc-stat>
<tc-stat label="Last" value="42 %" unit="Ø"></tc-stat>
<tc-stat label="Alarme" value="2" status="error"></tc-stat>
<tc-icon-button slot="actions" icon="renew" label="Aktualisieren" size="sm"></tc-icon-button>
</tc-stat-strip>
API
Option Standard Werte Beschreibung
items'None'– List of dicts: label, value, unit, status, delta, delta_direction, delta_rating, href. label''– Accessible name of the strip.
{% slot actions %}– Slot Benannter Inhaltsbereich.
Verwendung
{% load components tomcom_theme %}
{% tc_stat_strip items="…" label="…" %}…{% endtc_stat_strip %}
{% tc_stat_strip# %} {# 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.