Ü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

App Shell

Mit Sidebar

Topbar, gruppierte Navigation und Hauptbereich; auf Tablets Icon-Leiste, auf Phones Off-Canvas-Menü.

Code<div style="height:560px;overflow:auto;border:1px solid var(--tc-border-subtle);border-radius:6px"> {% tc_app_shell main_id="demo-main" %} {% slot topbar %}{% tc_topbar# product="Plattformname" environment="Test" user_name="Max Mustermann" notifications=3 help_url="#" %}{% endslot %} {% slot sidebar %} {% tc_sidebar %} {% tc_nav_group label="Übersicht" %} {% tc_nav_item# href="#" icon="dashboard" label="Dashboard" %} {% tc_nav_item# href="#" icon="document" label="Einträge" count=128 active=True %} {% tc_nav_item# href="#" icon="report" label="Berichte" %} {% endtc_nav_group %} {% tc_nav_group label="Verwaltung" collapsible=True %} {% tc_nav_item# href="#" icon="vpn--connection" label="Zugänge" %} {% tc_nav_item# href="#" icon="earth" label="Zonen" %} {% tc_nav_item# href="#" icon="certificate" label="Zertifikate" count=3 %} {% endtc_nav_group %} {% endtc_sidebar %} {% endslot %} {% slot footer %}{% tc_footer# product="Plattformname v2.4.1" status="Alle Dienste in Betrieb" %}{% endslot %} {% tc_page_header title="example.com" meta="Zone · 1.284 Records" description="Primärer Nameserver ns1.example.com · zuletzt verteilt vor 4 Min." %} {% slot actions %}{% tc_button# variant="outlined" icon="download" label="Zone exportieren" %}{% tc_button# icon="add" label="Record anlegen" %}{% endslot %} {% endtc_page_header %} {% endtc_app_shell %} </div>

Horizontale Navigation

für Tools mit wenigen Bereichen; auf Phones öffnet der Menü-Button die Einträge.

Code<div style="height:360px;overflow:auto;border:1px solid var(--tc-border-subtle);border-radius:6px"> {% tc_app_shell navigation="horizontal" width="wide" main_id="demo-main-horizontal" %} {% slot topbar %} {% tc_topbar product="Plattformname" navigation="horizontal" user_name="Max Mustermann" %} {% slot nav %}{% tc_topbar_item# label="Übersicht" active=True %}{% tc_topbar_item# label="Einträge" %}{% tc_topbar_item# label="Verlauf" %}{% tc_topbar_item# label="Statistik" %}{% endslot %} {% endtc_topbar %} {% endslot %} {% tc_page_header# variant="intro" eyebrow="Verbindung ins Firmennetz" title="Meine Zugänge" description="Verwalten Sie Ihre VPN-Profile und Geräte." %} {% endtc_app_shell %} </div>

HTML und JS-API

<tc-app-shell> ohne Template-Tags; toggleMenu(), openNav() und die Ereignisse tc-nav-open/tc-toggle.

Menü-Button auslösen
Code<div class="tc-stack" style="--tc-gap: 12px"> <div style="height:420px;overflow:auto;border:1px solid var(--tc-border-subtle);border-radius:6px"> <tc-app-shell id="raw-shell" main-id="raw-shell-main" skip-label="Zum Inhalt springen"> <tc-topbar slot="topbar" product="Plattformname" user-name="Max Mustermann" show-search="false" menu-label="Navigation öffnen"></tc-topbar> <tc-sidebar slot="sidebar" label="Hauptnavigation" collapse-label="Einklappen" expand-label="Ausklappen"> <tc-nav-group label="Übersicht"> <tc-nav-item icon="dashboard"><a href="#">Dashboard</a></tc-nav-item> <tc-nav-item icon="document" count="128" active><a href="#">Einträge</a></tc-nav-item> <tc-nav-item icon="report" href="#" label="Berichte"></tc-nav-item> </tc-nav-group> </tc-sidebar> <main id="raw-shell-main" tabindex="-1"> <tc-page-header headline="Einträge" description="Ohne Template-Tags: Topbar, Sidebar und Hauptbereich als HTML."></tc-page-header> </main> <tc-footer slot="footer" product="Plattformname v2.4.1" status="Alle Dienste in Betrieb"></tc-footer> </tc-app-shell> </div> <div class="tc-cluster"> <tc-button id="raw-shell-menu" variant="outlined" size="sm">Menü-Button auslösen</tc-button> <span id="raw-shell-log" class="tc-text-body-sm tc-text-secondary" aria-live="polite"></span> </div> </div> <script> (function () { var shell = document.getElementById('raw-shell'); var log = document.getElementById('raw-shell-log'); document.getElementById('raw-shell-menu').addEventListener('click', function () { shell.toggleMenu(); }); shell.addEventListener('tc-toggle', function (event) { log.textContent = 'tc-toggle: collapsed=' + event.detail.collapsed; }); shell.addEventListener('tc-nav-open', function () { log.textContent = 'tc-nav-open'; }); shell.addEventListener('tc-nav-close', function () { log.textContent = 'tc-nav-close'; }); })(); </script>

API

OptionStandardWerteBeschreibung
navigation'sidebar'Sidebar layout or horizontal topbar navigation.
main_id'main'–Id of the main region (skip-link target, HTMX swap target).
width''Optional max width of the main content.
{% slot topbar %}–SlotBenannter Inhaltsbereich.
{% slot sidebar %}–SlotBenannter Inhaltsbereich.
{% slot footer %}–SlotBenannter Inhaltsbereich.

Verwendung

{% load components tomcom_theme %} {% tc_app_shell navigation="…" main_id="…" %}…{% endtc_app_shell %} {% tc_app_shell# %} {# 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.