# Text

O componente do tipo <mark style="color:blue;">text</mark> deve ser utilizado quando o criador do tema disponibiliza ao usuário a inserção e/ou modificação de um texto dentro do tema. Ele pode ter dois formatos: sem o ícone ou com o ícone. Abaixo é possível visualizar a aparência deste campo em suas variações.

<figure><img src="/files/15In5YQEDSZpZWyL0pod" alt=""><figcaption><p><strong>Exibição do campo text sem e com ícone</strong></p></figcaption></figure>

**Estrutura padrão do campo:**

{% code overflow="wrap" %}

```json
{
    "label": "Título do campo de texto sem icone", 
    "type": "text",
    "description": "Descrição do campo",
    "placeholder": "Como deve ser o texto inserido",
    "field": "nome_do_campo_text",
    "validation": "required:true|min:10|max:30"
},

{
    "label": "Título do campo de texto", 
    "type": "text",
    "description": "Descrição do campo",
    "placeholder": "Como deve ser o texto inserido",
    "icon": "whatsapp",
    "field": "nome_do_campo_text2", 
    "validation": "required:true|min:10|max:30"
}
```

{% endcode %}

<table><thead><tr><th width="206">Atributo</th><th>Descrição</th></tr></thead><tbody><tr><td>label</td><td>Título do campo</td></tr><tr><td>type</td><td>Tipo do campo</td></tr><tr><td>description</td><td>Descrição do campo<br>Caso não houver, deixar vazio</td></tr><tr><td>placeholder</td><td><p>Texto exemplificando como deve ser o texto inserido</p><p>Caso não houver, deixar vazio</p></td></tr><tr><td>icon</td><td>Ícone a ser utilizado<br>Caso não houver, não é preciso utilizar essa chave</td></tr><tr><td>field</td><td>Campo utilizado no tema para exibir o item desejado. <br>Esse nome deve ser exatamente igual ao campo criado no tema</td></tr><tr><td>validation</td><td>Validações do campo<br>Caso não houver campo obrigatório, deixar como "validation": "required:false"<br>Os limites min e max são validações opcionais para a quantidade de caracteres mínimos e máximos permitidos nesse campo</td></tr></tbody></table>

#### Exemplos de exibição sem ícone:

<figure><img src="/files/jk9pyY4XkK8LuVjS23Qf" alt=""><figcaption><p><strong>Exibição do campo text sem ícone</strong></p></figcaption></figure>

<figure><img src="/files/n9cIC9cFJKQcV4UWfqQv" alt=""><figcaption><p><strong>Exibição do campo sendo preenchido</strong></p></figcaption></figure>

<figure><img src="/files/cSTqctPg5s2dPtFARTgs" alt=""><figcaption><p><strong>Exibição do campo com a validação realizada</strong></p></figcaption></figure>

#### Exemplos de exibição com ícone:

<figure><img src="/files/HRh56yPARMsHKfdKir3k" alt=""><figcaption><p><strong>Exibição do campo text com ícone</strong></p></figcaption></figure>

<figure><img src="/files/WwAJtrFj6UpGDCBDSBbx" alt=""><figcaption><p><strong>Exibição do campo text sendo preenchido</strong></p></figcaption></figure>

<figure><img src="/files/NATyvVz1uBTmRfaq9R7t" alt=""><figcaption><p><strong>Exibição do campo text com a validação realizada</strong></p></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://partners.tray.com.br/themes/construindo-seu-template/editor-do-tema/novo/estrutura/componentes/text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
