SectionedNav

Navigation

Sticky Header-Navigation mit gruppierten Sektionen (Desktop-Dropdown / Mobile-Drawer mit Kontakt-Block). Ideal für Vereine und Sites mit mehreren Inhaltsgruppen.

Live Demo

Beispiel-Inhalt unter der Navigation. Auf Desktop klappt das Dropdown „Verein“ aus, auf Mobile öffnet das Burger-Menü die gruppierten Sektionen mit Kontakt-Block.

Props / API

PropTypPflichtDefaultBeschreibung
itemsSectionedNavLink[]JaHauptlinks (immer sichtbar auf Desktop)
logoSectionedNavLogoNeinLogo {src, alt, href?, height?, brandText?, brandSuffix?}
sectionsSectionedNavSection[]NeinGruppierte Sektionen mit {label, links[], asDropdown?}
contactSectionedNavContact[]NeinKontakt-Einträge im Mobile-Drawer {type, href, label}
cta{href, icon, ariaLabel}NeinCTA-Icon-Button rechts in der Top-Bar
primaryColorstringNein'#1E56A0'Hauptfarbe (Header-Hintergrund)
primaryColorDarkstringNein'#163F75'Dunklere Variante (Mobile-Drawer)
accentColorstringNein'#E67E22'Akzentfarbe für CTA
accentColorDarkstringNein'#C46618'Hover-Variante der Akzentfarbe
fontFamilystringNein'inherit'Schriftfamilie für Nav-Items
position'fixed' | 'sticky'Nein'fixed'Positionierung der Navigation
renderLink(link, props) => ReactNodeNeinCustom Link-Renderer
classNamestringNeinZusätzliche CSS-Klasse

Code-Beispiel

<SectionedNav
  logo={{ src: '/images/logo.png', alt: 'TV Dahn', brandText: 'TV DAHN', brandSuffix: 'e.V.' }}
  items={[
    { href: '#aktuelles', label: 'Aktuelles' },
    { href: '#abteilungen', label: 'Abteilungen' },
    { href: '#vorstand', label: 'Vorstand' },
    { href: '#kontakt', label: 'Kontakt' },
  ]}
  sections={[
    {
      label: 'Verein',
      asDropdown: true,
      links: [
        { href: '/satzung', label: 'Satzung' },
        { href: '/beitragswesen', label: 'Beitragswesen' },
        { href: '/downloads', label: 'Downloads' },
      ],
    },
  ]}
  contact={[
    { type: 'mail', href: 'mailto:[email protected]', label: '[email protected]' },
    { type: 'phone', href: 'tel:063915149', label: '06391 / 5149' },
  ]}
  primaryColor="#1E56A0"
  primaryColorDark="#163F75"
/>