# Dropdown

> Dropdown picks one of many values - languages, biomes, profiles - by opening a picker screen that lists them all, with the same builder as Cycle.

URL: https://xichil.dev/docs/xis-mvui/v1/widgets/dropdown/ · Updated: 2026-11-06 · Applies to: Fabric, Quilt, Legacy Fabric, Forge, NeoForge, MC 1.7.10 - 26.3

Picks one of a list of values that is too long to step through with a [Cycle](https://xichil.dev/docs/xis-mvui/v1/widgets/cycle/index.md): languages, biomes,
profiles. It looks like a cycle ("label: value"); pressing it opens a picker screen listing every value.

```java
Dropdown.<String>builder("profile")
        .label(Text.translatable("mymod.profile", "Profile"))
        .values(profileNames)
        .value(() -> config.profile)
        .valueText(Text::literal)
        .onChange(name -> config.profile = name)
        .build();
```

## Builder

The same setters as [Cycle](https://xichil.dev/docs/xis-mvui/v1/widgets/cycle/index.md#builder): `label`, `values` (not empty, copied at build time), `value`,
`valueText` and `onChange` are all required, plus the [options every widget has](https://xichil.dev/docs/xis-mvui/v1/widgets/index.md#options-every-widget-has).
Give the value type explicitly: `Dropdown.<String>builder("profile")`.

## The picker screen

Pressing the dropdown opens a screen built from ordinary entries, which every version can draw:

| Part | Id |
| --- | --- |
| the screen, titled with the dropdown's label | `<id>.picker` |
| a [SelectList](https://xichil.dev/docs/xis-mvui/v1/widgets/select-list/index.md) of the values, the current one selected; row ids are the indexes `0`, `1`, … | `<id>.list` |
| a Cancel button in the footer | `<id>.cancel` |

Picking a row closes the picker and then passes the value to `onChange`. Cancel just closes it. Keep those three
ids free on your screen.

## Behaviour

- `valueText` is used both on the button and for the picker's rows.
- A value that isn't in the list shows as the first one.
- To offer a list that changes, build the screen again (for example, reopen it).
- **Footer:** yes.

## Test it

```java
host.click("profile");                             // opens "profile.picker"
host.select("profile.list", "2");                  // picks the third value and closes the picker
```

Rendered as `[dropdown profile] Profile: default`.

## See also

- Javadoc: [Dropdown](https://xichil.dev/javadoc/xis-mvui/v1/dev/xichil/mvui/Dropdown.html)
