> For the complete documentation index, see [llms.txt](https://docsv1.polyfrost.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docsv1.polyfrost.org/configuration/available-options/text-option.md).

# Text option

<figure><img src="https://455339379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEjGl1BGNegPgKE0wK4Y%2Fuploads%2FUyyK6K1NzkwrV7sR2ABF%2Fjava_WIFWo2mAw5.png?alt=media&amp;token=295f06ef-eec3-469d-9de6-5382105ee084" alt=""><figcaption><p>An example of what the text option looks like in-game.</p></figcaption></figure>

## Example

{% tabs %}
{% tab title="Java" %}

```java
@Text(
    title = "My Text",
    def = "", // Sets option's default value. Recommended, default = ""
    titleKey = "", // Sets the options tile translation key, default = ""
    description = "", // Sets the options description, default = ""
    descriptionKey = "", // Sets the options description translation key, default = ""
    icon = "", // Sets the icon used for the option, default = ""
    multiline = false, // Allows multiline text, default = false
    category = "General", // Sets the options category, default = "General"
    categoryKey = "", // Sets the categories translation key, default = ""
    subcategory = "General", // Sets the options subcategory, default = "General"
    subcategoryKey = "", // Sets the options subcategory translation key, default = ""
    placeholder = "", // Sets the options placeholder, default = ""
    placeholderKey = "polyui.textinput.placeholder" // Sets the options placeholder translation key, default = "polyui.textinput.placeholder"
)
public static String myText = "";
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
var myText: String by text(
    name = "My Text",
    def = "", // Sets option's default value. Recommended, default = ""
    nameKey = null, // Sets the options tile translation key, default = null
    description = null, // Sets the options description, default = null
    descriptionKey = null, // Sets the options description translation key, default = null
    icon = null, // Sets the icon used for the option, default = null
    multiline = false, // Allows multiline text, default = false
    category = "General", // Sets the options category, default = "General"
    categoryKey = null, // Sets the categories translation key, default = null
    subcategory = "General", // Sets the options subcategory, default = "General"
    subcategoryKey = null, // Sets the options subcategory translation key, default = null
    placeholder = null, // Sets the options placeholder, default = null
    placeholderKey = "polyui.textinput.placeholder", // Sets the options placeholder translation key, default = "polyui.textinput.placeholder"
)
```

{% endtab %}
{% endtabs %}


---

# 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://docsv1.polyfrost.org/configuration/available-options/text-option.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.
