Skip to main content

MenuProps

note

This type is deducted from Spotify's internal usage. It may not be accurate and may change in the future.

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