> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/dynamic-components/components/text.md).

# Text

The Avonni Text component displays a block of formatted text — static, dynamic, or a combination — making it useful for labels, headings, data display, and debugging.

## Overview

The Text component can render:

* **Static text**: Content you type directly into the configuration.
* **Dynamic text**: A value derived from a Variable, Constant, Formula, or a Salesforce record field.
* **A combination**: Static text mixed with dynamic values using formulas.

### Use Cases

* **Labels and Headings**: Structure your UI with static text labels, headings, and subheadings.
* **Displaying Data**: Show the value of a field from a Salesforce record (e.g., an Account's name).
* **Troubleshooting**: Display the value of Variables, Formulas, or component attributes to inspect what is happening in your Dynamic Component.
* **Placeholder Text**: Show temporary placeholder text before data is loaded.
* **Concatenating Values**: Combine and display multiple values in a single block.

## Configuration

To configure the Text component, select it on the canvas. The configuration panel opens on the right. The sections below mirror its properties.

### Properties

#### Content

The **Content** field defines what the component displays. It supports rich text formatting — bold, italic, links, and lists.

You can set it in several ways:

* **Static text**: Type the content directly into the rich text editor.
* **Resource binding**: Click the resource selector icon and choose a Variable, Constant, or Formula to display its value dynamically.
* **Formula**: Click the resource selector icon, choose the Formula data type, and compose an expression that evaluates to text.

### Set Component Visibility

All components support conditional visibility — see [Component Visibility](/dynamic-components/core-concepts/component-visibility.md).

## Styling

Configure the Text component's appearance from the **Style** tab of the Edit Text panel.

{% tabs %}
{% tab title="Margin" %}
Controls the *outer* spacing around the component.

* **Top / Right / Bottom / Left:** Adjust the space on each side.
  {% endtab %}

{% tab title="Padding" %}
Controls the *inner* spacing around the text.

* **Top / Right / Bottom / Left:** Adjust the space on each side.
  {% endtab %}

{% tab title="Size" %}
Controls the component's dimensions.

* **Width / Height:** Set fixed dimensions.
* **Min Width / Max Width / Min Height / Max Height:** Constrain the size within bounds.
* **Overflow:** Control how content that exceeds the bounds is handled.
  {% endtab %}

{% tab title="Border" %}
Customizes the border surrounding the component.

* **Color / Size / Style / Radius:** Set the border color, thickness, style, and corner rounding.
  {% endtab %}

{% tab title="Text" %}
Styles the text content.

* **Color / Font Size / Font Style / Font Weight:** Set the text color and typography.
* **Alignment:** Set the horizontal alignment of the text.
* **Line Clamp:** Limit the text to a maximum number of lines.
  {% endtab %}
  {% endtabs %}

## Troubleshooting Common Issues

* **Content not updating** — If the displayed value does not change when a Variable or Formula changes, verify the Content property is bound to a resource rather than set as static text. Use the resource selector icon to bind it.
* **Debugging a Variable** — Add a Text component, click the resource selector icon next to Content, and select the Variable you want to inspect. The component displays the current value and updates automatically as it changes.
* **Debugging a Formula** — Add a Text component, open the resource selector next to Content, select Mapped, then choose the Formula from the list. The component displays the Formula's calculated value. Remove the Text component once debugging is complete.
* **Displaying a Component Attribute** — Add a Text component, open the resource selector next to Content, select Mapped, then find the component and select the attribute you want to inspect. Its value will be displayed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.avonnicomponents.com/dynamic-components/components/text.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
