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.

@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

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.

@Text(
    name = "Text box",
    secure = false, multiline = true
)
public static String moretext = "";
Multiline text box examples

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.

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.

@Text(
    name = "Secrets :o :eyes:",
    secure = true, multiline = false
)
public static String shhh = "";
Secure text input example

Last updated

Was this helpful?