How to do cursor:pointer in group-hover tailwind css?

by mallory_cormier , in category: HTML & CSS , 7 months ago

How to do cursor:pointer in group-hover tailwind css?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by lottie , 7 months ago

@mallory_cormier 

To apply the cursor:pointer style to an element on group hover using Tailwind CSS, you can use the following classes:

1
2
3
<div class="group hover:cursor-pointer">
  <!-- Your element here -->
</div>


In this example, the cursor:pointer style will be applied to the element inside the div when the parent div is being hovered over. The group class is used to create a shared hover state for child elements within the parent div.