Ü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

Icon Button

Stile

Subtle ohne Fläche, Outline mit Rahmen, Filled mit Fläche; das Label ist Pflicht (Tooltip und Screenreader).

Code<div class="tc-stack"> <div class="tc-cluster"> {% tc_icon_button# icon="edit" label="Bearbeiten" %} {% tc_icon_button# icon="overflow-menu--vertical" label="Weitere Aktionen" %} {% tc_icon_button# icon="copy" label="Kopieren" intent="primary" %} {% tc_icon_button# icon="trash-can" label="Löschen" intent="danger" %} </div> <div class="tc-cluster"> {% tc_icon_button# icon="filter" label="Filter" variant="outline" %} {% tc_icon_button# icon="renew" label="Aktualisieren" variant="outline" intent="primary" %} {% tc_icon_button# icon="close" label="Sperren" variant="outline" intent="danger" %} </div> <div class="tc-cluster"> {% tc_icon_button# icon="settings" label="Einstellungen" variant="filled" %} {% tc_icon_button# icon="add" label="Neu" variant="filled" intent="primary" %} {% tc_icon_button# icon="checkmark" label="Bestätigen" variant="filled" intent="success" %} {% tc_icon_button# icon="warning" label="Prüfen" variant="filled" intent="warning" %} {% tc_icon_button# icon="trash-can" label="Löschen" variant="filled" intent="danger" %} </div> </div>

Größen und Formen

SM 28, MD 36, LG 44 px; quadratisch mit Control-Radius oder rund.

Code<div class="tc-cluster"> {% tc_icon_button# icon="add" label="Neu" variant="outline" size="sm" %} {% tc_icon_button# icon="add" label="Neu" variant="outline" %} {% tc_icon_button# icon="add" label="Neu" variant="outline" size="lg" %} {% tc_icon_button# icon="add" label="Neu" variant="filled" intent="primary" shape="circle" size="sm" %} {% tc_icon_button# icon="add" label="Neu" variant="filled" intent="primary" shape="circle" %} {% tc_icon_button# icon="add" label="Neu" variant="filled" intent="primary" shape="circle" size="lg" %} {% tc_icon_button# icon="renew" label="Wird geladen" variant="outline" loading=True %} {% tc_icon_button# icon="edit" label="Bearbeiten" variant="outline" disabled=True %} </div>

API

OptionStandardWerteBeschreibung
icon'add'–Carbon icon name.
label''–Accessible name (required) and tooltip text.
variant'subtle'Subtle (no fill), outline or filled.
intent'neutral'Colour intent.
shape'square'Square uses the control radius, circle is round.
size'md'sm 28, md 36, lg 44 px.
tooltipTrue–Show the label in the theme tooltip on hover and keyboard focus.
href''–Render a link with button styling instead of a <button>.
type'button'Native button type.
disabledFalse–Disable the control (links get aria-disabled).
loadingFalse–Show a spinner, keep the width and block clicks.

Verwendung

{% load components tomcom_theme %} {% tc_icon_button icon="…" label="…" %}…{% endtc_icon_button %} {% tc_icon_button# %} {# 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.