# UiMenu

A button that opens a popover menu of selectable options. Supports a flat list via the `options` prop or a grouped list (with optional group labels) via the `groupedOptions` prop — these are mutually exclusive. Optionally includes a search input (`hasSearch`) to filter options and a reset button (`hasResetOption`). The menu can animate its open/close transition via the `animate` prop; the transition duration can be customized by applying `placed-list-class="[--transition-duration:3000ms]"` for animating in and `placed-list-class="[--transition-close-duration:2000ms]"` for animating out.

## Usage

```html
<template>
  <UiMenu :options="options" />
</template>

<script setup>
import UiMenu from "@dpa-id-components/dpa-shared-components/components/UiMenu/UiMenu.vue";
import { ref } from "vue";

const options = ref([
  {
    value: "code",
    label: "Code",
    selected: true,
  },
  {
    value: "issues",
    label: "Issues",
    selected: false,
  },
  {
    value: "pull_requests",
    label: "Pull requests",
    selected: false,
  },
]);
</script>
```

**With search**:

```html
<template>
  <UiMenu
    v-model:query="query"
    :options="options"
    has-search
    has-reset-option
  />
</template>

<script setup>
import UiMenu from "@dpa-id-components/dpa-shared-components/components/UiMenu/UiMenu.vue";
import { ref } from "vue";

const query = ref("");
const options = ref([
  {
    value: "code",
    label: "Code",
    selected: true,
  },
  {
    value: "issues",
    label: "Issues",
    selected: false,
  },
  {
    value: "pull_requests",
    label: "Pull requests",
    selected: false,
  },
]);
</script>
```
