# IconLink

An icon-only link for navigation and downloads.

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"use client";

import { FloodRoot, IconLink } from "@flood-md/react";
import { ArrowRight } from "lucide-react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <IconLink href="/docs/installation" label="Read the installation guide">
        <ArrowRight />
      </IconLink>
    </FloodRoot>
  );
}
```

## Design notes

- Provide a destination or outcome in label and use a recognizable decorative icon. Use a text Link when the glyph alone would be ambiguous.
- IconLink keeps native anchor behavior and shares target and glyph sizing with IconButton. Use IconButton for commands and IconLink for navigation or downloads.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` |
| `href` | `string` | `Required` |
| `label` | `string` | `Required` |
| `variant` | `Exclude<LinkProps["variant"], "text">` | `"subtle"` |
| `iconSize` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `size` |
| `Native HTML props` | `Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href" \| "variant" \| "aria-label">` | `Forwarded` |
