[//]: # (This file is auto-generated by the docs:generate-skills script, do not edit it manually)

# TextLink

Import: `import { TextLink } from '@neo4j-ndl/react'`

## Props

### TextLink

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `as` | `ElementType<any, keyof IntrinsicElements>` |  |  | An override of the default HTML tag of the root of the component. Can also be another React component. |
| `children` | `ReactNode` | ✅ |  | The content displayed inside the link |
| `href` | `string` |  |  | The URL the link points to |
| `ref` | `any` |  |  | A ref to apply to the root element. |
| `target` | `string` |  | `type === 'external' ? '_blank' : ''` | Specifies where to open the linked document. If omitted and `type` is `"external"` it defaults to `"_blank"`. |
| `type` | `'external' \| 'internal'` |  | `internal` | The type of the text link. All types render with an underline and primary text color by default. Additional color styling can be applied via `className`. - 'internal': A link to another page within the application - 'external': A link to an external website. An external link icon is appended. |

## Accessibility

## Implementation guidelines

TextLink is always underlined and uses primary text color by default, making it distinguishable in running text. By default the component renders an anchor element but can be overridden with the `as` prop.

## Examples

### External

```tsx
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';

import { TextLink, Typography } from '@neo4j-ndl/react';

const Component = () => {
  return (
    <Typography variant="body-medium">
      The quick brown fox{` `}
      <TextLink href="https://neo4j.com" type="external">
        jumps
      </TextLink>
      {` `}over the lazy dog.
    </Typography>
  );
};

export default Component;
```

### Internal

```tsx
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';

import { TextLink, Typography } from '@neo4j-ndl/react';

const Component = () => {
  return (
    <Typography variant="body-medium">
      The quick brown fox{` `}
      <TextLink href="/" type="internal">
        jumps
      </TextLink>
      {` `}over the lazy dog.
    </Typography>
  );
};

export default Component;
```
