Astro components
Link
A styled anchor link component.
A robust link component that supports internal and external links, optional icons, and arrow indicators.
Usage
---
import Link from '@/components/Link.astro';
import { MailIcon } from 'lucide-react';
---
<Link href="/contact" withArrow>Contact Us</Link>
<Link href="https://google.com" external>Google</Link>Props
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | - | Destination URL. |
withArrow | boolean | false | Displays an animated arrow icon. |
external | boolean | false | If true, adds behavior for external links (new tab icon logic). |
iconClass | string | - | CSS classes for the arrow icon. |
class | string | - | Additional CSS classes for the link. |