# `FrappeUIPhx.Components.Dropdown`
[🔗](https://github.com/moacirbishopcamata/frappe_ui_phx/blob/v0.3.1/lib/frappe_ui_phx/components/dropdown.ex#L1)

Menu suspenso sem JavaScript: Popover API (light-dismiss e Esc nativos) +
CSS Anchor Positioning (inverte para cima quando falta espaço).

Cada `:item` pode disparar um evento (`click`) ou navegar (`navigate`,
`patch`, `href`); o menu fecha ao escolher.

# `dropdown`

## Attributes

* `id` (`:string`) (required)
* `label` (`:string`) - texto do botão padrão (ignorado se houver `:trigger`). Defaults to `nil`.
* `icon` (`:string`) - ícone do botão padrão. Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `trigger` - conteúdo do gatilho personalizado.
* `item` (required) - Accepts attributes:

  * `label` (`:string`) (required)
  * `icon` (`:string`)
  * `click` (`:any`) - evento do servidor ou comando JS.
  * `navigate` (`:string`)
  * `patch` (`:string`)
  * `href` (`:string`)
  * `theme` (`:atom`) - :gray (padrão) ou :red.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
