---
title: "Text"
description: "Markdown text (a string child is a Text)."
---

> Documentation Index
> Fetch the complete documentation index at: https://gistui.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Text

```gistui
root = Stack("A string child is **Markdown** text.", Text("Muted, small text.", size:sm, muted), Text("Centred, large text.", size:lg, align:center))
```

## Signature

This is the line a model reads in the system prompt.

```gistui
Text(content, size:Size, align:start|center|end, muted)
```

- **Group:** Content
- **Children:** No
- **Positional arguments:** `content` (a trailing `?` means it may be left out)

## Props

| Prop | Type | How to write it | Notes |
|---|---|---|---|
| `content` | string | positional, required |  |
| `size` | `sm` · `md` · `lg` | named: `size:…` | Also accepts `small`, `medium`, `large`. |
| `muted` | flag | bare word: `muted` |  |
| `align` | `start` · `center` · `end` | named: `align:…` |  |

## Use your own component

Keep the name and schema, swap what is drawn. The prompt and the model's output do not change.

### React

```tsx
import { ui } from "@gistui/react/ui";

const lib = ui.extend({ Text: MyText });
<GistUI library={lib} stream={response.body} />;
```
### Vue

```vue
<GistUI :source="answer" :components="{ Text: MyText }" />
```
### Svelte

```svelte
<GistUI source={answer} components={{ Text: MyText }} />
```
### Solid

```tsx
<GistUI source={answer()} components={{ Text: MyText }} />
```
### Vanilla

```ts
import { ui } from "@gistui/vanilla/ui";

const lib = ui.extend({ Text: (ctx) => ({ el: myElement(ctx) }) });
```

See [Custom components](/docs/guides/custom-components/) for the full contract. Style hook: `[data-gistui="Text"]`.

Source: https://gistui.com/docs/components/content/text/index.mdx
