# Text

Consistent typographical components like text and link.

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

<Heading>Text component</Heading>
<Text className="mt-2">This is the standard text component for body copy and general content throughout your application.</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

Use the `variant` and `color` props to adjust the text color based on its importance and context.

```tsx
<Text variant="strong">Strong text color</Text>
<Text>Default text color</Text>
<Text variant="subtle">Subtle text color</Text>
<Text color="blue">Colored text</Text>
```

## 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>
```

## 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>
```

## Link as button

Pass `render={<button type="button" />}` to render a link as a button, including `type="button"` so it does not submit a surrounding form.

```tsx
<Link render={<button type="button" />}>Create new account →</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: `zinc` and `gray`, which look the same as no color, or `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.
