Varianten
Sidebar-Layout mit Menü-Button, Testumgebung mit Badge, horizontale Navigation.
Navigation
Navy application bar: menu button, tomcom logo, product name, environment badge, horizontal navigation, search (Ctrl/⌘ K), actions, theme switch and user menu. Compact on phones. Element API: navOpen and searching properties, openSearch(), tc-menu (cancelable) event.
Sidebar-Layout mit Menü-Button, Testumgebung mit Badge, horizontale Navigation.
eigener Inhalt im user_menu-Slot (natives Popover), zusätzliche Aktionen im actions-Slot.
<tc-topbar> mit <tc-topbar-item>-Links; Suche und Theme-Switch entstehen automatisch, openSearch() und tc-menu.
| Option | Standard | Werte | Beschreibung |
|---|---|---|---|
product | '' | – | Platform name next to the logo. |
product_href | '/' | – | Link of logo and product name. |
show_company | True | – | Show the tomcom logo. |
environment | '' | – | Environment badge such as "Test"; empty hides it (production). |
navigation | 'sidebar' | Shows the menu button for a sidebar layout. | |
show_search | True | – | Show the search field (replace it with the search slot). |
search_url | '' | – | GET action of the search form. |
search_name | 'q' | – | Query parameter name. |
search_value | '' | – | Current query. |
search_placeholder | '' | – | Placeholder; defaults to "Search …". |
help_url | '' | – | Shows a help icon link. |
notifications | 'None' | – | Unread count; shows a bell (0 shows the bell without badge). |
notifications_url | '' | – | Link of the bell. |
show_theme | True | – | Show the light/dark/auto switch. |
user_name | '' | – | Signed-in user; shows avatar and name. |
user_initials | '' | – | Avatar initials; derived from the name by default. |
{% slot nav %} | – | Slot | Benannter Inhaltsbereich. |
{% slot search %} | – | Slot | Benannter Inhaltsbereich. |
{% slot actions %} | – | Slot | Benannter Inhaltsbereich. |
{% slot user_menu %} | – | Slot | Benannter Inhaltsbereich. |
Search field for the topbar search slot. Form-associated: place it in your own <form> (e.g. with hx-boost); Enter submits the form, Ctrl/⌘ K focuses it.
| Option | Standard | Werte | Beschreibung |
|---|---|---|---|
name | 'q' | – | Query parameter name. |
value | '' | – | Current query. |
placeholder | '' | – | Placeholder; defaults to "Search …". |
label | '' | – | Accessible name; defaults to "Search". |
Horizontal navigation entry inside the topbar nav slot (light DOM link, HTMX friendly).
| Option | Standard | Werte | Beschreibung |
|---|---|---|---|
href | '#' | – | Target URL. |
label | '' | – | Text when the slot is empty. |
active | False | – | Current page (aria-current). |
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.