# Text

Themeable body copy with `size` and `color` variants. Renders a `p`, or the `render` element. Defaults can come from `TextContext`.

## Use for

- body copy or a paragraph
- secondary or muted text
- inline copy inside other text, with `render`

## Practices

- Do: Pass `render={<span />}` for inline copy.
- Do: Use `color='foreground-secondary'` for muted copy instead of an `xstyle` color.

## API reference

### Text

Renders a `p` and forwards its ref. Carries `data-size` and `data-color`.

Slot: `cl-text`

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `TypographySize` | `'sm'` | `xs`, `sm`, `base`, `lg`, `xl` or `2xl`. |
| `color` | `TypographyColor` | `'foreground'` | `foreground`, `foreground-secondary`, `brand`, `warning`, `negative` or `positive`. |

## Examples

### Body copy

```tsx
<Text>{description}</Text>
```

### Inline muted copy

```tsx
<Text render={<span />} color='foreground-secondary'>{email}</Text>
```
