# <dropdown>

A Material dropdown menu: a field that opens a list of choices; the chosen value is readable by id.

Category: Overlays.

```ham
<column style="gap-12">
    <dropdown id="size"
              label="Size">
        <menu-item value="s">Small</menu-item>
        <menu-item value="m">Medium</menu-item>
        <menu-item value="l">Large</menu-item>
    </dropdown>
</column>
```

How Hype Apps draws it on a phone: [light](https://hypeapps.dev/img/tags/dropdown-light.webp), [dark](https://hypeapps.dev/img/tags/dropdown-dark.webp).

## Attributes

| Name | What it does | Default |
|---|---|---|
| `expanded` | Fill the available width. | `false` |
| `label` | Dropdown label. |  |

## Readings

| Name | What it does |
|---|---|
| `index` | The chosen item's position, from 0; -1 when none. |
| `label` | The chosen item's text; empty when none. |
| `value` | The chosen item's value; empty when none. |

Any tag also takes gestures: `@on.tap`, `@on.longpress`, `@on.doubletap` and `@on.swipeleft` (and right, up and down). `@click` runs on a tap too.

## Related tags

- [`<column>`](https://hypeapps.dev/docs/reference/column.md): Stacks its children top to bottom, with a gap between them and an alignment across.
- [`<menu-item>`](https://hypeapps.dev/docs/reference/menu-item.md): One choice in a popup menu or dropdown: an icon, a label, and the action it runs.
- [`<bottom-sheet>`](https://hypeapps.dev/docs/reference/bottom-sheet.md): A sheet that slides up from the bottom of the screen, with a drag handle and a title.
- [`<dialog>`](https://hypeapps.dev/docs/reference/dialog.md): A dialog with a title, a message, and confirm and cancel buttons that run statements.
- [`<popover>`](https://hypeapps.dev/docs/reference/popover.md): Floats its children next to another element, like a reactions bar over a Like button.
- [`<popup-menu>`](https://hypeapps.dev/docs/reference/popup-menu.md): An icon button that opens a context menu; picking an item runs its action and fires select.
- [`<snackbar>`](https://hypeapps.dev/docs/reference/snackbar.md): A short message bar pinned to the bottom of the screen, with an optional action button.

All tags: https://hypeapps.dev/docs/reference.md · The full reference: https://hypeapps.dev/llms.txt
