Navigation
Hauptnavigation in zwei Menü-Formen: klassische Leiste ODER Burger-Flyout (Logo + Primary-CTA + Burger, Links im Vollflächen-Overlay rechtsbündig) — navigate als semantisches Event
Beispiele
Mit Marke und aktivem Eintrag
Unsichere URL → neutralisiert
Leiste mit Aktions-Buttons rechts (Varianten ghost | soft | secondary | primary)
Menü-Form „flyout": Logo + Primary-CTA + Burger (klicken → Vollflächen-Overlay, Escape schließt)
Eigenschaften
| Prop | Typ | Default | Builder-Label |
|---|---|---|---|
| brand | string | "" | Markenname |
| items * | array | — | Einträge |
| logo | string | "" | Logo-URL (https, optional — vor der Marke) |
| menu | string: bar | flyout | "bar" | Menü-Form (Leiste oder Burger-Flyout) |
| ctaLabel | string | "" | CTA-Beschriftung (Flyout: Button rechts) |
| ctaUrl | string | "" | CTA-Ziel |
| ctaVariant | string: primary | secondary | "primary" | CTA-Button-Variante |
| extraItems | array | [] | Zweitlinks im Flyout (Impressum …) |
| actions | array | [] | Aktions-Buttons rechts (Leiste) |
* Pflicht-Prop
Events & Slots
Events:
⚡ navigate — im Surface per on: {<event>: {action, params}} verdrahtbar.
Genutzte Design-Tokens
border.hairlinecolor.action.on-primarycolor.action.on-secondarycolor.action.primarycolor.action.primary-hovercolor.action.secondarycolor.action.secondary-hovercolor.border.defaultcolor.surface.defaultcolor.surface.overlaycolor.text.defaultcolor.text.mutedduration.baseduration.fasteasing.standardelevation.overlayfocus.ring-colorfocus.ring-offsetfocus.ring-widthfont.family.defaultlayer.dropdownlayer.modalradius.controlradius.fullradius.overlayradius.smradius.surfacesize.10size.12size.2size.24size.3size.6text.3xltext.lgtext.mdtext.smweight.boldweight.mediumweight.regularweight.semibold
LLM-Notizen
component.navigation
Kopfnavigation einer Website. Zwei Menü-Formen über die Prop menu: bar (klassische Leiste mit Links + Aktions-Buttons rechts) und flyout (Logo + CTA + Burger, Links im Vollflächen-Overlay).
Wann nutzen
- Jede Website-Surface bekommt genau EINE navigation im
header-Slot des Templates. flyoutfür reduzierte Personal-/Portfolio-Seiten,barfür Portale und Shops.- Dropdown-Menüs:
items[].children(Label + href + optionale Beschreibung) macht aus einem Item einen Dropdown-Button.
Wichtige Props
items: Hauptlinks[{label, href, active?, children?}]— genau ein Item sollteactivesein.actions: Buttons rechts[{label, href, variant: primary|secondary|soft|ghost}](nurbar).ctaLabel/ctaUrl/ctaVariant+extraItems: nur fürflyout.logo(https-URL) und/oderbrand(Text).
Beispiel-Node
{
"nodeId": "node-nav",
"definition": "component.navigation",
"props": {
"menu": "bar",
"brand": "Acme",
"items": [{"label": "Start", "href": "/", "active": true}, {"label": "Preise", "href": "/preise/"}],
"actions": [{"label": "Login", "href": "/login/", "variant": "ghost"}, {"label": "Registrieren", "href": "/signup/", "variant": "primary"}]
}
}
Hinweise
- Emittiert
navigate— ohne Binding navigiert der Browser normal (Progressive Enhancement). - Farben kommen vollständig aus dem Theme (
surface.default,action.*) — keine Farb-Props.