Skip to main content

Options

You can customize the behavior with options, passed as the second argument.

OptionDefaultPossible values
focusFirstItemOnClickfalseboolean
OptionExplanation
focusFirstItemOnClickIf specified as true, the first menu item will be focused when the menu is opened via a click (in addition to via a keyboard interaction).
useDropdownMenu(numberOfItems, {
focusFirstItemOnClick: true,
});