Skip to main content

On Click

The onClick prop allows you to define a custom function that will be called when the menu item is clicked. It provides a way to handle the click event and perform specific actions or logic in response to the click.

Props

onClick?: (event: React.MouseEvent<HTMLElement>) => void

Example

/horizontal-menu/menu-item/on-click

Click on Analytics and check console

Source Code