# Popover (Dropdown Menu) Popovers (`Popover`) are dropdown menus activated by a button. Use popovers to create dropdown menus ranging from simple lists to complex nested menus. Common uses: - "More actions" dropdown menus - Navigation menus - Settings menus - Context menus (right-click menus) ::: warning This component has severe usability issues and cannot be used as-is: - I can't operate the popup with a keyboard. Remove barrier for people not using a mouse (A11y) - Switching to submenus is error-prone. When moving cursor into freshly opened submenu, it should not close if the cursor crosses another menu item - Large menus disappear. When menus get big, they need to scroll. Common Ui libraries in the Vue ecosystem such as vuetify or shadcn-vue all implement these features. It may be prudent to use their components. ::: | Prop | Data type | Required? | Description | | ------ | --------- | --------- | ---------------------------------------------------------- | | `open` | Boolean | No | Controls whether the popover is open. Defaults to `false`. | [[toc]] ```vue-html ``` Destructure the function `toggleOpen` and let a [default dropdown button: `OptionsButton`](./button/options.md) trigger it. This way, the state of the component is encapsulated. ## Bind to `isOpen` If you want to process or influence the expansion of the menu in the containing component, you can bind it to a `ref`. Use [Vue event handling](https://vuejs.org/guide/essentials/event-handling.html) to map the button to a boolean value. ```vue{7} ``` ## Customize the dropdown button ```vue ``` ## Items Popovers contain a list of menu items. Items can contain different information based on their type. ::: info Lists of items must be nested inside a `