Feedback & overlays
Menu
A popup list anchored to the control that opened it: actions, a checklist, a single choice with a tick, or a long checklist under a fixed footer.
import { EcoMenu } from "vue-ecosphere"
Account menu
Actions close the menu. Arrow keys, Home and End move between entries; Escape closes and returns focus.
Filter menu
A checklist toggles without closing, so several entries change in one visit.
Range menu
A single choice marks the current value with a tick and closes on choosing.
Long checklist, fixed footer
A table's column chooser: the entries scroll, and Compact rows stays in reach underneath.
API
| Name | Type | Default | Description |
|---|---|---|---|
items | EcoMenuItem[] | — | { type?: 'item' | 'checkbox' | 'radio' | 'separator' | 'head', label, value?, icon?, danger?, disabled? }. Or write menu__opt buttons in the default slot. |
v-model:open | boolean | false | Open state (menu.is-open). Escape and an outside click close it; Escape returns focus to the trigger. |
v-model:checked | (string | number)[] | [] | Values of the ticked checkbox entries. Checklist entries toggle without closing. |
v-model:selected | string | number | — | Value of the chosen radio entry (tick); choosing closes the menu. |
align | "left" | "right" | "left" | right → menu--right, aligned to the trigger's right edge. A single-choice menu (radio items) is a rangemenu and always opens from the right edge. |
wide | boolean | false | menu--wide (320px). |
scroll | boolean | false | menu--scroll: entries scroll in menu__scroll under a fixed menu__foot. |
head | string | — | Uppercase caption (menu__head). The #head slot replaces it (e.g. menu__who). |
#trigger | slot { attrs, open, toggle } | — | Bind attrs to your button: aria-haspopup, aria-expanded, aria-controls, click and ArrowDown/ArrowUp to open. |
#foot | slot { close } | — | menu__foot (split layout unless scroll). |
@select | (item) => void | — | An entry was chosen. |