Skip to content

MenuProps

The MenuProps object is used to create a menu.

type MenuProps = {
onClose?: () => void;
getInitialFocusElement?: (el: HTMLElement | null) => HTMLElement | undefined | null;
};

Properties

PropertyTypeDescription
onClose() => void | undefinedFunction that is called when the menu is closed
getInitialFocusElement(el: HTMLElement | null) => HTMLElement | undefined | null | undefinedFunction that provides the element that focus should jump to when the menu is opened