How to creat a contextual menu with Tailwind CSS and Alpinejs

Michael Andreuzza - May 8 - - Dev Community

Let's hack the right click event and create a contextual menu with Tailwind CSS and Alpinejs. We'll use the @contextmenu.prevent directive to prevent the browser from opening the default contextual menu.

Read the article, See it live and get the code

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .