Currently, I am working on a project using React and Tailwindcss. The issue I am facing involves creating a card with shadowed text that only appears when hovered over an image. I want to make the hover effect smoother by adding a transition class, but I am struggling to implement it correctly. Can anyone provide guidance on where exactly I should apply the transition class in my code?
Below is the snippet of my code:
<div className="group relative grid w-80 h-full flex-col items-end justify-center overflow-hidden rounded-4xl text-center">
<div className="absolute h-full w-full overflow-hidden bg-cardBg bg-cover bg-center">
<div className="hidden group-hover:block cursor-pointer w-full h-full to-bg-black-10 bg-gradient-to-t from-black/70 via-black/20"></div>
</div>
<div className="hidden group-hover:block cursor-pointer relative p-6 px-6">
<h2 className="mb-6 block text-4xl font-medium leading-[1.5] tracking-normal text-white antialiased">
Shadowed Text Bla Bla Bla
</h2>
</div>
</div>
I'm looking to achieve a seamless and smooth hover effect for the text. Any suggestions or tips would be greatly appreciated.