Skip to content

Menu.Root Events

PropertyTypeDescription
onOpenChange(open: boolean) => void(optional) Called whenever the open state changes. Receives the new open state as a boolean.

Menu.Action Events

PropertyTypeDescription
onClick(event: React.MouseEvent<HTMLLIElement>) => void(optional) Called when the action is clicked or activated via keyboard (Enter/Space). The menu closes automatically after the handler is invoked unless used as a trigger for a nested Menu.Root.

Menu.Accordion Events

PropertyTypeDescription
onOpenChange(open: boolean) => void(optional) Called whenever the accordion open state changes. Receives the new open state as a boolean.