Displaying button when hovering over div in TailwindCSS

Add this to your tailwind.config.js file

variants: {
    extend: {
        display: ["group-hover"],
    },
},

And then add group to your parent div and hidden and group-hover:block to your child element that you want to appear on hover of the parent.

<div class="group">
  <button class="hidden group-hover:block">Child</button>
</div>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)