# Generative UI: Text

> Display headings, rich text, badges, code, math and tooltips.

Source: <https://everruns.com/docs/reference/generative-ui/text/>

Display headings, rich text, badges, code, math and tooltips.

[All categories](https://everruns.com/docs/reference/generative-ui/)[Layout](https://everruns.com/docs/reference/generative-ui/layout/)[Text](https://everruns.com/docs/reference/generative-ui/text/)[Inputs](https://everruns.com/docs/reference/generative-ui/inputs/)[Data](https://everruns.com/docs/reference/generative-ui/data/)[Dynamic values](https://everruns.com/docs/reference/generative-ui/dynamic-values/)[Media](https://everruns.com/docs/reference/generative-ui/media/)[Composites](https://everruns.com/docs/reference/generative-ui/composites/)[Feedback](https://everruns.com/docs/reference/generative-ui/feedback/)

Try the controls and expand **A2UI example** for source. Actions display their message and values locally; no account or agent run is needed. Use **Reset** to start again. External maps and media load only when you select their load button.

No examples match. Try another component name or category.

Text

## Title sizes

`Title`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-7",
    "catalogId": "copilotkit/standard@1",
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 2,
        "children": [
          "a",
          "b",
          "c",
          "d"
        ]
      },
      {
        "id": "a",
        "component": "Title",
        "text": "Title 2xl",
        "size": "2xl"
      },
      {
        "id": "b",
        "component": "Title",
        "text": "Title lg",
        "size": "lg"
      },
      {
        "id": "c",
        "component": "Title",
        "text": "Title md (default)"
      },
      {
        "id": "d",
        "component": "Title",
        "text": "Title sm",
        "size": "sm"
      }
    ]
  }
}
```

Text

## Text with inline markdown, styles, colors, inline Badge

`Text`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-8",
    "catalogId": "copilotkit/standard@1",
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 2,
        "children": [
          "a",
          "r",
          "b",
          "c",
          "d"
        ]
      },
      {
        "id": "a",
        "component": "Text",
        "text": "Inline **bold**, *italic*, ~~strike~~, ++underline++, `code`, [link](https://copilotkit.ai)."
      },
      {
        "id": "r",
        "component": "Row",
        "gap": 2,
        "children": [
          "i",
          "u",
          "s"
        ]
      },
      {
        "id": "i",
        "component": "Text",
        "text": "italic",
        "italic": true
      },
      {
        "id": "u",
        "component": "Text",
        "text": "underline",
        "underline": true
      },
      {
        "id": "s",
        "component": "Text",
        "text": "lineThrough",
        "lineThrough": true
      },
      {
        "id": "b",
        "component": "Text",
        "text": "Secondary color, small size",
        "color": "secondary",
        "size": "sm"
      },
      {
        "id": "c",
        "component": "Text",
        "text": "Weight medium with a trailing badge",
        "fontWeight": "medium",
        "children": [
          "bd"
        ]
      },
      {
        "id": "bd",
        "component": "Badge",
        "label": "New",
        "color": "success"
      },
      {
        "id": "d",
        "component": "Text",
        "text": "Truncated to two lines: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.",
        "maxLines": 2
      }
    ]
  }
}
```

Text

## Caption, Label, Bold, Italic, Underline, Strikethrough

`Caption``Label``Bold``Italic``Underline``Strikethrough`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-9",
    "catalogId": "copilotkit/standard@1",
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 2,
        "children": [
          "c",
          "l",
          "r"
        ]
      },
      {
        "id": "c",
        "component": "Caption",
        "text": "Caption: a hint under a control"
      },
      {
        "id": "l",
        "component": "Label",
        "text": "Label: a field label"
      },
      {
        "id": "r",
        "component": "Row",
        "gap": 2,
        "children": [
          "b",
          "i",
          "u",
          "s"
        ]
      },
      {
        "id": "b",
        "component": "Bold",
        "text": "Bold"
      },
      {
        "id": "i",
        "component": "Italic",
        "text": "Italic"
      },
      {
        "id": "u",
        "component": "Underline",
        "text": "Underline"
      },
      {
        "id": "s",
        "component": "Strikethrough",
        "text": "Strikethrough"
      }
    ]
  }
}
```

Text

## Badge colors and variants

`Badge`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-10",
    "catalogId": "copilotkit/standard@1",
    "components": [
      {
        "id": "root",
        "component": "Row",
        "gap": 2,
        "wrap": "wrap",
        "children": [
          "a",
          "b",
          "c",
          "d",
          "e",
          "f",
          "g"
        ]
      },
      {
        "id": "a",
        "component": "Badge",
        "label": "secondary"
      },
      {
        "id": "b",
        "component": "Badge",
        "label": "success",
        "color": "success"
      },
      {
        "id": "c",
        "component": "Badge",
        "label": "danger",
        "color": "danger"
      },
      {
        "id": "d",
        "component": "Badge",
        "label": "warning",
        "color": "warning"
      },
      {
        "id": "e",
        "component": "Badge",
        "label": "info",
        "color": "info"
      },
      {
        "id": "f",
        "component": "Badge",
        "label": "solid",
        "color": "discovery",
        "variant": "solid"
      },
      {
        "id": "g",
        "component": "Badge",
        "label": "outline",
        "variant": "outline"
      }
    ]
  }
}
```

Text

## Blockquote, Code, Markdown, Math

`Blockquote``Code``Markdown``Math`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-11",
    "catalogId": "copilotkit/standard@1",
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 3,
        "children": [
          "q",
          "c",
          "m",
          "x"
        ]
      },
      {
        "id": "q",
        "component": "Blockquote",
        "text": "Simplicity is the ultimate sophistication."
      },
      {
        "id": "c",
        "component": "Code",
        "language": "ts",
        "text": "const price = seats * 29;\nconsole.log(`$${price}/mo`);"
      },
      {
        "id": "m",
        "component": "Markdown",
        "text": "### Markdown block\n\nRendered with the chat's renderer: a list\n\n- one\n- **two**\n\nand a [link](https://copilotkit.ai)."
      },
      {
        "id": "x",
        "component": "Math",
        "value": "E = mc^2",
        "block": true
      }
    ]
  }
}
```

Text

## ShimmerText, Link, Tooltip

`ShimmerText``Link``Tooltip`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-12",
    "catalogId": "copilotkit/standard@1",
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 2,
        "children": [
          "s",
          "l",
          "t"
        ]
      },
      {
        "id": "s",
        "component": "ShimmerText",
        "text": "Thinking about your request…"
      },
      {
        "id": "l",
        "component": "Link",
        "text": "copilotkit.ai",
        "href": "https://copilotkit.ai"
      },
      {
        "id": "t",
        "component": "Tooltip",
        "trigger": "tt",
        "content": "tc"
      },
      {
        "id": "tt",
        "component": "Text",
        "text": "Hover me for a tooltip",
        "underline": true
      },
      {
        "id": "tc",
        "component": "Text",
        "text": "Shown on hover"
      }
    ]
  }
}
```

Using these components in chat? See [Generative UI in chat](https://everruns.com/docs/features/generative-ui/) and [AG-UI support](https://everruns.com/docs/integrations/ag-ui/).

Examples adapted from the [CopilotKit standard catalog](https://docs.copilotkit.ai/generative-ui/components/standard-catalog), under the [MIT license](https://github.com/everruns/everruns/blob/main/apps/ui/generative-ui/COPILOTKIT-LICENSE).