# Dropdown option

<figure><img src="/files/QhfJYss9fxF7j7dTghgZ" alt=""><figcaption><p>An example of what the dropdown looks like in-game.</p></figcaption></figure>

<figure><img src="/files/kpef1cim8HZjb6mN9rXu" alt=""><figcaption><p>An example of what the dropdown looks like in-game when it is expanded.</p></figcaption></figure>

## Example

## TODO: Redo Kotlin example with Kotlin DSL for enumerables and dropdowns

### Using an integer index

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

```java
@Dropdown(
    title = "My Dropdown",
    description = "This is my dropdown", // Recommended, default = ""
    icon = "/my_dropdown.svg", // Optional, default = ""
    category = "Dropdowns", // Recommended, default = "General"
    subcategory = "General" // Recommended, default = "General"
    options = { "HELLO", "WORLD", "ONECONFIG" } // Recommended, default = {}
)
public static int myDropdown = 0; // 0 = "HELLO"
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
@Dropdown(
    title = "My Dropdown",
    description = "This is my dropdown", // Recommended, default = ""
    icon = "/my_dropdown.svg", // Optional, default = ""
    category = "Dropdowns", // Recommended, default = "General"
    subcategory = "General" // Recommended, default = "General"
    options = ["HELLO", "WORLD", "ONECONFIG"] // Recommended, default = []
)
var myDropdown = 0 // 0 = "HELLO"
```

{% endtab %}
{% endtabs %}

### Using a custom enum class

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

```java
public enum MyDropdownOptions {
    HELLO,
    WORLD,
    ONECONFIG;
}

@Dropdown(
    title = "My Dropdown",
    description = "This is my dropdown", // Recommended, default = ""
    icon = "/my_dropdown.svg", // Optional, default = ""
    category = "Dropdowns", // Recommended, default = "General"
    subcategory = "General" // Recommended, default = "General"
    // We can't use the options field when using an enum.
)
public static MyDropdownOptions myDropdown = MyDropdownOptions.HELLO;
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
enum class MyDropdownOptions {
    HELLO,
    WORLD,
    ONECONFIG
}

@Dropdown(
    title = "My Dropdown",
    description = "This is my dropdown", // Recommended, default = ""
    icon = "/my_dropdown.svg", // Optional, default = ""
    category = "Dropdowns", // Recommended, default = "General"
    subcategory = "General" // Recommended, default = "General"
    // We can't use the options field when using an enum.
)
var myDropdown = MyDropdownOptions.HELLO
```

{% endtab %}
{% endtabs %}


---

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