Sequence
docs
Astro components

Header link

Navigation link with active state styling.

A link component used in the header that automatically highlights itself when the current URL matches its destination.

Usage

---
import HeaderLink from '@/components/HeaderLink.astro';
---

<HeaderLink href="/about">About</HeaderLink>

Props

PropTypeDefaultDescription
hrefstring-The URL path for the link.
classstring-Additional CSS classes.
...propsHTMLAttributes<'a'>-Any other attributes passed to the anchor tag.

On this page