.. sectionauthor:: John Molakvoæ .. codeauthor:: John Molakvoæ .. _popovermenu: ============ Popover menu ============ What is a popover menu ---------------------- This is a quick menu that open on click. For menus, we use the three-dot-icon. This is exactly the same as the :ref:`navigation menu `. The only difference is the popovermenu class. Basic layout ------------ .. figure:: ../images/popovermenu.png :alt: Popover image example :figclass: figure-with-code .. code-block:: html
Technical details ----------------- * The only allowed menu items elements are **a**, **button** and **span** for the checkbox and radio only. * You can mix between a and button on the same menu (in case of form or direct link) like the example above * You need to put the entire menu just after the three dot icon ``
...
`` * You do not need JS, CSS only is ok for positioning. JS is **still** required to handle the hide/show. * Only **one** ul is allowed. * Only **one level** of menu is allowed. * Every entry **needs** to have its own icon. This greatly improves the UX. * The required **right** distance to the border (or padding, whatever you want to use) of the three-dot icon should be 14px (5 for menu margin and 6 for arrow position) * The ``span`` element **must** have the ``menuitem`` class. * The checkbox/radio must use the :ref:`nextcloud custom ` * The form element is optional if you're using inputs. * Supported inputs are all text based ones and buttons type ones .. image:: ../images/popover-position.png Alignment --------- If you want to align your menu, you can add the class to the main popovermenu div. * Center: ``menu-center`` * Left: ``menu-left`` * Right is by default