Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ProvidedMenuToggleProps<E>

Props that should be passed to a Button or MenuItem component to toggle the visibility of a Menu.

remarks

@since 5.0.0

Type parameters

  • E: HTMLElement

Hierarchy

  • ProvidedMenuToggleProps

Index

Properties

aria-expanded: undefined | Booleanish

This will be set to true only while the menu is visible.

aria-haspopup: undefined | boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree"

This will always be set to "menu".

id: string

This will be set to ${baseId}-toggle and is used for providing an accessible label to the menu if the BaseMenuHookOptions.menuLabel was not provided.

see

BaseMenuHookOptions.baseId

onClick: MouseEventHandler<E>

A click handler that will toggle the visibility of the menu.

see

HoverModeHookReturnValue.onClick

onKeyDown: KeyboardEventHandler<E>

The event handler will allow the menu to become visible by with ArrowUp or ArrowDown for horizontal menus and ArrowLeft or ArrowRight for vertical menus. This will also allow the focus to move between menus within a MenuBar with the ArrowLeft and ArrowRight keys.

onMouseEnter: MouseEventHandler<E>

The event handler will allow a Menu within a MenuBar to gain visibility.

onMouseLeave: MouseEventHandler<E>

This handler just cancels the hoverTimeout from the MenuBar.

Generated using TypeDoc