useDropdownMenu
Create custom dropdown menus without the extra component with useDropdownMenu.
Make sure to spread through the returned props. If creating a navigation menu
(as described here), make sure
to provide the role='menu' prop to automatically get correct keyboard focus handling.
API
import useDropdownMenu from 'react-overlays/DropdownMenu'useDropdownMenu(options: object) => voidParameters
optionsobjectflipbooleanAutomatically adjust the menu
dropposition based on viewport edge detectionoffset[number, number]Define an offset distance between the Menu and the Toggle
showbooleanDisplay the menu manually, ignored in the context of a
DropdownusePopperbooleanopt in/out of using PopperJS to position menus. When disabled you must position it yourself.
rootCloseEventstringThe pointer event to listen for when determining "clicks outside" the menu for triggering a close.
popperConfigobjectOptions passed to the
usePopperhook.