Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DropdownMenuConfigurationProps

remarks

@since 5.0.0

Hierarchy

Index

Properties

anchor?: PositionAnchor

The PositionAnchor to use for the menu. Here's the default value for the anchor:

  • horizontal - BELOW_CENTER_ANCHOR
  • a submenu - TOP_RIGHT_ANCHOR
  • default - TOP_INNER_RIGHT_ANCHOR
closeOnResize?: boolean

Boolean if the menu should close instead of repositioning itself if the browser window is resized.

defaultvalue

false

closeOnScroll?: boolean

Boolean if the menu should close if the page is scrolled. The default behavior is to just update the position of the menu relative to the menu button until it can no longer be visible within the viewport.

defaultvalue

false

disableFocusOnMount?: boolean

Boolean if the menu component should not gain focus once it has mounted. This should really only be set to true if the enter transition has been disabled.

defaultvalue

timeout === 0

disableFocusOnUnmount?: boolean

Boolean if the toggle element should no longer gain focus when the menu loses visibility.

Note: The toggle element will not gain focus if:

  • the menu closed via resizing the browser window
  • the menu closes because the menu is no longer within the viewport
  • the current document.activeElement has moved outside of the menu
    • this generally means the MenuItem's action cause the focus to move already
  • the current document.activeElement is an link (<a href="">)
    • links should generally handle focus behavior themselves
defaultvalue

timeout === 0

fixedPositionOptions?: Readonly<CalculateFixedPositionOptions>

{@inheritDoc CalculateFixedPositionOptions}

menuLabel?: string

An optional aria-label that should be applied to the Menu component. If this is undefined, an aria-labelledby will be provided to the Menu instead linking to the id of the Button.

preventScroll?: boolean

Boolean if the page should no longer be scrollable while the menu is visible.

defaultvalue

false

Methods

  • getFixedPositionOptions(): Readonly<CalculateFixedPositionOptions>

Generated using TypeDoc