# Link

A textual interactive element that can be used as an anchor (`<a>`) or as a button.

## Usage <a href="#usage" id="usage"></a>

```jsx
import { Link } from '@aragon/ui'

function App() {
  return <Link href="https://example.com/">Example</Link>
}
```

## Demonstration

![](/files/brHUDtYh3fX5EocAlZQt)

## Props <a href="#props" id="props"></a>

#### onClick <a href="#onclick" id="onclick"></a>

| TYPE       | DEFAULT VALUE |
| ---------- | ------------- |
| `Function` | None          |

Gets called when the user activates the link. Like for `Button`, it gets called when the enter key is pressed on the keyboard.

#### href <a href="#href" id="href"></a>

| TYPE     | DEFAULT VALUE |
| -------- | ------------- |
| `String` | None          |

When set, the component will act like a normal HTML anchor.

#### external <a href="#external" id="external"></a>

| TYPE      | DEFAULT VALUE |
| --------- | ------------- |
| `Boolean` | `false`       |

Set to `true` to make the link external, which will add an underline. If a `href` is present, it will also add a `target="_blank"` attribute and [make it safe](https://mathiasbynens.github.io/rel-noopener/) by default.

#### Other props <a href="#other-props" id="other-props"></a>

Any other prop will be passed to the `ButtonBase` component.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://legacy-docs.aragon.org/developers/tools/aragonui/navigation/link.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
