> ## Documentation Index
> Fetch the complete documentation index at: https://react-docx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Link

Hyperlinks to external URLs or internal document locations.

```tsx theme={"dark"}
<Link href="https://example.com">Visit website</Link>
<Link href="#section-1">Jump to Section 1</Link>
```

***

## Props

| Prop        | Type        | Description             |
| ----------- | ----------- | ----------------------- |
| `href`      | `string`    | URL or anchor reference |
| `children`  | `ReactNode` | Link text               |
| `className` | `string`    | Tailwind classes        |

***

## External links

```tsx theme={"dark"}
<Paragraph>
  Visit <Link href="https://example.com">our website</Link> for more info.
</Paragraph>

<Paragraph>
  Contact us at <Link href="mailto:hello@example.com">hello@example.com</Link>.
</Paragraph>
```

Supported protocols: `http://`, `https://`, `mailto:`, `ftp://`.

***

## Internal links

Use `#` to link to bookmarks within the document:

```tsx theme={"dark"}
<Paragraph>
  See <Link href="#introduction">Introduction</Link> for details.
</Paragraph>
```

***

## Styling

```tsx theme={"dark"}
<Link href="https://example.com" className="text-blue-600 underline">
  Styled link
</Link>

<Link href="#section" className="text-green-600 font-bold">
  Bold green link
</Link>
```

***

## Bookmark

Create anchor points that internal links can target.

```tsx theme={"dark"}
<Bookmark name="introduction">
  <H1>Introduction</H1>
</Bookmark>

{/* Link to it */}
<Paragraph>
  Back to <Link href="#introduction">Introduction</Link>.
</Paragraph>
```

### Bookmark props

| Prop       | Type        | Description                           |
| ---------- | ----------- | ------------------------------------- |
| `name`     | `string`    | Anchor identifier (used with `#name`) |
| `children` | `ReactNode` | Content to wrap                       |

***

## Headings as anchors

Headings with `id` prop automatically create bookmarks:

```tsx theme={"dark"}
<H1 id="chapter-1">Chapter 1</H1>

{/* Link to it */}
<Paragraph>
  See <Link href="#chapter-1">Chapter 1</Link>.
</Paragraph>
```

This is equivalent to:

```tsx theme={"dark"}
<Bookmark name="chapter-1">
  <H1>Chapter 1</H1>
</Bookmark>
```

***

## Common patterns

### Navigation menu

```tsx theme={"dark"}
<Paragraph className="mb-4">
  <Link href="#overview">Overview</Link> |
  <Link href="#features"> Features</Link> |
  <Link href="#contact"> Contact</Link>
</Paragraph>
```

### References

```tsx theme={"dark"}
<Paragraph>
  As discussed in <Link href="#methodology">Section 2</Link>, the methodology
  follows established practices<Link href="#ref-1">[1]</Link>.
</Paragraph>
```

### Footer links

```tsx theme={"dark"}
<Section.Footer>
  <Paragraph className="text-center text-sm text-gray-500">
    <Link href="https://company.com">Company</Link> |
    <Link href="mailto:support@company.com"> Support</Link>
  </Paragraph>
</Section.Footer>
```
