Zoeken...  ⌘K GitHub

NavLogoRight Navigation

Logo rechts, links links. Onconventioneel maar opvallend design.

/nav-logo-right
src/components/nav/NavLogoRight.astro
---
/**
 * NavLogoRight
 * Logo rechts, navigatielinks links. Onconventioneel maar opvallend.
 */
interface Props {
  logo: string;
  links: { label: string; href: string; active?: boolean }[];
  cta?: { label: string; href: string };
}
const { logo, links, cta } = Astro.props;
---
<header class="nlr">
  <nav class="nlr-inner">
    <ul class="nlr-links">
      {links.map(l => (
        <li><a href={l.href} class={`nlr-link${l.active ? ' nlr-link--active' : ''}`}>{l.label}</a></li>
      ))}
    </ul>
    {cta && <a href={cta.href} class="nlr-cta">{cta.label}</a>}
    <a href="/" class="nlr-logo">{logo}</a>
  </nav>
</header>
<style>
  .nlr { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 100; }
  .nlr-inner { max-width: 1280px; margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; height: 64px; gap: 1rem; }
  .nlr-links { list-style: none; padding: 0; margin: 0; display: flex; flex: 1; gap: 0; }
  .nlr-link { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; text-decoration: none; padding: 0.375rem 0.875rem; border-radius: 0.375rem; transition: all 0.15s; }
  .nlr-link:hover, .nlr-link--active { color: var(--color-accent,#6366f1); background: rgba(99,102,241,0.07); }
  .nlr-cta { font-size: 0.875rem; font-weight: 600; padding: 0.5rem 1.25rem; border: 2px solid #0a0a0a; color: #0a0a0a; border-radius: 0.5rem; text-decoration: none; transition: all 0.2s; white-space: nowrap; }
  .nlr-cta:hover { background: #0a0a0a; color: #fff; }
  .nlr-logo { font-weight: 800; font-size: 1.0625rem; color: #0a0a0a; text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; margin-left: 1rem; }
  @media (max-width: 768px) { .nlr-links { display: none; } }
</style>

Props

Prop Type Default Beschrijving
logo * string Merknaam (rechts geplaatst)
links * { label: string; href: string; active?: boolean }[] Navigatielinks
cta { label: string; href: string } CTA knop

* = verplicht