Ü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

QR Code

Typen

QR-Code allein oder als Karte mit Wert und Download

Code<div class="tc-cluster" style="--tc-gap: 24px; align-items: flex-start"> {% tc_qr_code# value="https://example.com/c/8F3K2" label="QR-Code für example.com/c/8F3K2" %} {% tc_qr_code# type="card" value="example.com/c/8F3K2" download_url="#" download_label="PNG herunterladen" %} </div>

VPN-Zugang

kleiner QR-Code zum Einrichten auf dem Smartphone

Mit der WireGuard-App scannen

Der Code enthält den privaten Schlüssel und wird nur einmal angezeigt.

Code<div class="tc-cluster" style="--tc-gap: 16px; align-items: flex-start"> {% tc_qr_code# value="vpn://example.com/peer/notebook-beispiel" size=120 label="VPN-Konfiguration Notebook Beispiel" %} <div class="tc-stack" style="--tc-gap: 8px; max-width: 280px"> <p class="tc-text-section">Mit der WireGuard-App scannen</p> <p class="tc-text-body-sm tc-text-secondary">Der Code enthält den privaten Schlüssel und wird nur einmal angezeigt.</p> </div> </div>

HTML

<tc-qr-code> direkt im Markup; ohne SVG-Kind zeigt es den Platzhalter (QR-Codes erzeugt der Server).

Code<div class="tc-cluster" style="--tc-gap: 24px; align-items: flex-start"> <tc-qr-code label="QR-Code folgt"></tc-qr-code> <tc-qr-code type="card" value="example.com/c/7Q2M9"></tc-qr-code> </div>

API

OptionStandardWerteBeschreibung
value''–Encoded text, e.g. "https://example.com/c/8F3K2".
type'code'Code only or card with value and download.
label''–Accessible name; defaults to "QR code".
size165–Edge length in px.
download_url''–Card: URL of a downloadable image (e.g. PNG view).
download_label''–Card: download button text; defaults to "Download PNG".

Verwendung

{% load components tomcom_theme %} {% tc_qr_code value="…" type="…" %}…{% endtc_qr_code %} {% tc_qr_code# %} {# 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.