# Link

Use the link component to create clickable text that navigates to other pages or resources.

```tsx
import { Link, Text } from '@fluxui-dev/react';

<Text>Visit our <Link href="#">documentation</Link> for more information.</Text>
```

## Size

Use standard Tailwind to control the size of the text so that you can more easily adapt to different screen sizes.

```tsx
<Text className="text-base">Base text size</Text>
<Text>Default text size</Text>
<Text className="text-xs">Smaller text</Text>
```

## Color

A link placed directly inside a `Text` component with a `color` prop inherits that color instead of using the accent color.

```tsx
<Text variant="strong">
    Strong text with a <Link href="#">link</Link>
</Text>
<Text color="blue">
    Blue text with a <Link href="#">link</Link>
</Text>
<Text color="red">
    Red text with a <Link href="#">link</Link>
</Text>
```

## Link

Use the link component to create clickable text that navigates to other pages or resources.

```tsx
<Text>Visit our <Link href="#">documentation</Link> for more information.</Text>
```

## Link variants

Links can be styled differently based on their context and importance.

```tsx
<Link href="#">Default link</Link>
<Link href="#" variant="ghost">Ghost link</Link>
<Link href="#" variant="subtle">Subtle link</Link>
```

## Reference

### Text

**Prop:**

- `size` - Size of the text. Options: `sm`, `base`, `lg`, `xl`. Default: `base`.
- `variant` - Text variant. Options: `strong`, `subtle`. Default: `default`.
- `color` - Color of the text. Options: `red`, `orange`, `amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`, `violet`, `purple`, `fuchsia`, `pink`, `rose`. Default: none, which uses the `variant`'s color.
- `inline` - If `true`, the text element will be a `span` instead of a `p`.

### Link

**Prop:**

- `href` - The URL that the link points to. An in-app URL navigates through the link registered in `FluxProvider`.
- `variant` - Link style variant. Options: `default`, `ghost`, `subtle`. Default: `default`.
- `accent` - If `true`, colors the link with the accent color instead of the default text color. Ignored when `variant` is `subtle`. Default: `true`.
- `external` - If `true`, the link will open in a new tab.
- `render` - Element to render instead of the `a` tag (such as `<button type="button" />`), with the link's props merged in. Also accepts a function that receives the props and returns an element.
