# Text & Paragraph

- **Section:** Components
- **URL:** https://refast.fastapicloud.dev/docs/components/text
- **Markdown:** https://refast.fastapicloud.dev/docs/components/text.md
- **Source:** https://github.com/idling-mind/refast-docs/blob/main/docs/pages/components/typography/text.py
- **Live examples:** the widgets on this page need a browser; open the URL above to try them.
- **Applies to:** refast 0.12.2

Two text primitives: **`Text`** for inline/span-like text, and **`Paragraph`**
for block-level `<p>` elements.

```python
from refast.components import Text, Paragraph

# Inline text with Tailwind classes
Text("Hello world", class_name="text-lg font-semibold text-primary")

# Block paragraph
Paragraph("Body copy goes here.", muted=True)

# Lead paragraph (larger intro text)
Paragraph("Welcome to the docs.", lead=True)
```

Text component: The quick brown fox jumps over the lazy dog.

Paragraph component: The quick brown fox jumps over the lazy dog.

## Text Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `content` | `str` | *(required)* | Text content |
| `id` | `str \| None` | `None` | Unique element ID |
| `class_name` | `str` | `""` | Tailwind CSS classes |
| `style` | `dict \| None` | `None` | Inline CSS overrides |

## Paragraph Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `text` | `str` | *(required)* | Paragraph content |
| `lead` | `bool` | `False` | Larger lead paragraph style |
| `muted` | `bool` | `False` | Applies `text-muted-foreground` |
| `id` | `str \| None` | `None` | Unique element ID |
| `class_name` | `str` | `""` | Extra Tailwind classes |
| `style` | `dict \| None` | `None` | Inline CSS overrides |

## Notes

Use `Text` when you need fine-grained control over individual spans. Use
`Paragraph` for prose content — it renders a semantic `<p>` element.

---

Part of the Refast documentation: [all pages](https://refast.fastapicloud.dev/llms.txt), [everything on one page](https://refast.fastapicloud.dev/llms-full.txt), [search](https://refast.fastapicloud.dev/api/search?q=save_prop).
