# Link

> Styled text link with underline variants.

Registry name: `link`. HTML docs: https://ui.anuragroy.dev/component/link.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/link.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/link.json`.

Registry JSON: https://ui.anuragroy.dev/r/link.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/link.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import { Link } from "@/components/ui/link"
```

## Usage

```tsx
import { Link } from "@/components/ui/link"

export function Example() {
  return <Link href="/docs">Documentation</Link>
}
```

## API

### Link

Native `a` with CVA variants.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | "default" \| "muted" \| "foreground" | "default" |  |
| `underline` | "none" \| "hover" \| "always" | "hover" |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/link): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/link.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
