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

# Text Configs

Learn about the config components that allow the user to enter text.

## Common text inputs

### Normal Text

The normal text input is a field in which a user can type in a value as a String. Simple as that. It's got both single and dual-column variants.

```java
@Text(
    name = "Write something here!",
    placeholder = "please?",        // optional, text to display when there is nothing written there
    secure = false, multiline = false
)
public static String hi = "";
```

![Example text fields](https://3056662043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPLa0wt84LweTZoNVj4Z%2Fuploads%2FLmxerX5RVBufDrDuZsyJ%2Fimage.png?alt=media\&token=c3efbb83-97a7-40c9-b954-b36972099665)

### Text box

Basically the same as a normal text field, but it can have multiple lines. It dynamically changes size based on the amount of text written in it. Since it's meant to hold large bodies of text, it can only be displayed in a single-column variant.

```java
@Text(
    name = "Text box",
    secure = false, multiline = true
)
public static String moretext = "";
```

![Multiline text box examples](https://3056662043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPLa0wt84LweTZoNVj4Z%2Fuploads%2FHLXGkML6AEnzPOwW103J%2Fimage.png?alt=media\&token=5547d296-054a-45ef-8152-dd2da4e30a5b)

### When to use text inputs versus boxes

It's pretty obvious. The large text box is used for long Strings or Strings with multiple lines. If you're letting the user change their HUD text, you should use regular text inputs.&#x20;

## Secure Text Input

This has the same functionality as normal text inputs, with the added feature of hiding its content until the user presses the 'show' button. It's got both single and dual-column variants.

{% hint style="warning" %}
**IMPORTANT:** This should ALWAYS be used for passwords, API keys, locations, or any other personal information.
{% endhint %}

```java
@Text(
    name = "Secrets :o :eyes:",
    secure = true, multiline = false
)
public static String shhh = "";
```

![Secure text input example](https://3056662043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPLa0wt84LweTZoNVj4Z%2Fuploads%2FNjLu2h6saM5NjmmEUcKd%2Fimage.png?alt=media\&token=75ee0cb3-7a0f-4b3e-8dd9-914f6a208422)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.polyfrost.org/oneconfig/config/adding-options/text-configs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
