Tab-Leiste (Pills)
Segmentierte Pill-Tab-Leiste (Atlassian-Collections-Muster): Leiste auf sunken-Fläche, aktiver Tab als Secondary-Pill — progressive Links, optional zentriert. 1.1.0 (opt-in): Icon und Zaehler je Reiter, variant underline (Ansichts-Reiter mit Unterstrich), Hinzufuegen-Reiter (addLabel + addHref). 1.6
Beispiele
Segmentierte Pill-Tabs, aktiver Tab als Secondary-Pill
Ansichts-Reiter mit Unterstrich, Icons, Zaehler und Hinzufuegen (1.1.0)
1.7: Kontextspalte – kleine Reiter mit Symbolen (size sm, ghost), Umbruch statt Rollen (overflow wrap)
Eigenschaften
| Prop | Typ | Default | Builder-Label |
|---|---|---|---|
| touch | boolean | false | Touch-Groessen (44 px) |
| items * | array | — | Tabs |
| centered | boolean | true | Zentriert |
| variant | string: pill | underline | ghost | "pill" | Darstellung |
| size | string: md | sm | "md" | Groesse |
| overflow | string: scroll | wrap | "scroll" | Ueberlauf |
| addLabel | string | "" | Reiter Hinzufuegen: Beschriftung |
| addHref | string | "" | Reiter Hinzufuegen: Ziel |
| padding | string: standard | none | sm | md | lg | xl | "standard" | Innenabstand (standard = Baustein-Wert) |
| margin | string: standard | none | sm | md | lg | xl | "standard" | Aussenabstand |
| border | string: standard | none | hairline | strong | "standard" | Rahmen |
| radius | string: standard | none | control | surface | pill | "standard" | Ecken-Rundung |
| textColor | string | "" | Textfarbe (Token; leer = Standard) |
| backgroundColor | string | "" | Hintergrundfarbe (Token; leer = Standard) |
| shadow | string: standard | none | sm | md | lg | "standard" | Schatten |
| width | string: standard | full | "standard" | Breite |
| alignSelf | string: standard | start | center | end | "standard" | Ausrichtung im Elternteil |
| anchor | string | "" | Anker-ID (Sprungziel, z. B. fuer Nav-Links) |
* Pflicht-Prop
Events & Slots
Events:
⚡ change — im Surface per on: {<event>: {action, params}} verdrahtbar.
Slot actions:
akzeptiert ui.*, component.*
Stellschrauben (Komponenten-Tokens)
Ebene 3 — aus dem CSS generiert (Registry). Umverdrahtbar per Hüllen-Komposition, ohne Markup-Eingriff; künftige Regler-Quelle des Component Builders.
| Token | Default |
|---|---|
--tab-bar-action-on-secondary | var(--color-action-on-secondary) |
--tab-bar-action-secondary | var(--color-action-secondary) |
--tab-bar-focus-ring-color | var(--focus-ring-color) |
--tab-bar-focus-ring-offset | var(--focus-ring-offset) |
--tab-bar-focus-ring-width | var(--focus-ring-width) |
--tab-bar-radius-full | var(--radius-full) |
--tab-bar-surface-sunken | var(--color-surface-sunken) |
--tab-bar-text-default | var(--color-text-default) |
Genutzte Design-Tokens
border.emphasisborder.hairlinecolor.action.on-secondarycolor.action.primarycolor.action.secondarycolor.border.defaultcolor.border.strongcolor.chart.1color.chart.2color.chart.3color.chart.4color.chart.5color.chart.6color.chart.7color.chart.8color.surface.defaultcolor.surface.sunkencolor.text.accentcolor.text.defaultcolor.text.mutedcontrol.heightduration.fasteasing.standardelevation.controlfocus.ring-colorfocus.ring-offsetfocus.ring-widthfont.family.defaultleading.tightradius.fullsize.05size.1size.1-5size.10size.2size.3size.4size.5size.6size.8tag.amber.tonetag.blue.tonetag.gray.tonetag.green.tonetag.orange.tonetag.pink.tonetag.red.tonetag.teal.tonetag.violet.tonetext.2xstext.smweight.mediumweight.regular
LLM-Notizen
# component.tab-bar
Segmentierte Pill-Tab-Leiste (Atlassian-Collections-Muster): Leiste auf sunken-Fläche, aktiver Tab als Secondary-Pill — progressive Links, optional zentriert. Varianten `underline` (Ansichts-Reiter mit Unterstrich) und `ghost` (Reiter ohne Leiste, z. B. in einer Titelzeile oder der Kontextspalte eines Chats).
## Wann nutzen
- Für Seiten-Navigation als verlinkte Reiter (jeder Tab ist ein `href`) oder für Ansichten derselben Seite (`panel` bzw. `event`).
- Nicht für Panel-Umschaltung mit viel Inhalt je Reiter — dafür `component.tabs`; nicht für genau eine Auswahl in Formularen — dafür `component.segmented-control`.
## Wichtige Props
- `items` * = Reiter, je `{ label* (max 60), href? (max 500), panel? (id eines Bereichs: Reiter wird Knopf, tab-bar.js schaltet um), event? (Knopf mit data-invisible-event), active?, icon? (Lucide-Name, ui.icon sm vor der Beschriftung), count? (Zähler-Pille), color? (Farbpunkt gray|red|orange|amber|green|teal|blue|violet|pink), action? ({icon, label, trigger}: kleiner Knopf im Link-Reiter) }`
- `variant` = `pill` (Standard) | `underline` | `ghost`
- `centered` = Leiste zentrieren (Standard true)
- `size` (1.7.0, 28.10.2026, opt-in) = `md` (Standard) | `sm`: kleinere Reiter für schmale Spalten (Schrift text-sm, Höhe size-8, Innenabstand size-2)
- `overflow` (1.7.0, opt-in) = `scroll` (Standard: einzeilig, die Leiste rollt waagrecht — ghost ohne Rollbalken und mit sanftem Ausblenden am Rand, underline mit Schattenkante) | `wrap` (die Reiter brechen in weitere Zeilen um). `pill` bricht in beiden Fällen um.
- `addLabel` + `addHref` = dezenter Reiter „Hinzufügen“ am Ende
- Slot `actions` = Knöpfe rechts in der Leiste (z. B. Aktualisieren)
## Beispiel-Node
{ "definition": "component.tab-bar", "props": { "centered": true, "items": [ { "label": "Alle", "href": "/alle", "active": true }, { "label": "Favoriten", "href": "/favoriten" } ] } }
## Beispiel Kontextspalte (schmal, 1.7)
{ "definition": "component.tab-bar", "props": { "variant": "ghost", "centered": false, "size": "sm", "items": [ { "label": "Agent", "event": "panel:agent", "icon": "bot", "active": true }, { "label": "Themen", "event": "panel:themen", "icon": "messages-square", "count": 12 }, { "label": "Board", "event": "panel:board", "icon": "kanban" } ] } }
## Hinweise
- Link-Reiter sind rein serverseitig/CSS; mit `panel` oder `variant: "underline"` kommt tab-bar.js dazu (Umschalten ohne Neuladen, DOM-Ereignis `invisible-tab-bar:change`, aktiver Reiter rollt beim Laden ins Bild).
- Alle Props seit 1.1 sind opt-in: ohne sie bleibt das Markup wie 1.0; ungültige Werte (z. B. `size: "lg"`, `overflow: "none"`) fallen auf den Standard zurück.
- 1.8.0 (29.10.2026, nex, wingQ-Chat): opt-in
touch: true- auf Touch-Geraeten Reiter 44 px hoch.