Problem: Play overlay.

Solution#

html
<div class="group relative overflow-hidden rounded-xl">
  <img class="aspect-video w-full object-cover transition group-hover:scale-105" src="thumb.jpg" alt="" />
  <span class="absolute inset-0 grid place-items-center"><span class="grid size-14 place-items-center rounded-full bg-white/90 text-xl shadow-lg">▶</span></span>
</div>

Why this works#

Overlay play button + hover zoom.

Variants#

  • Responsive: add screen prefixes to the core classes
  • Dark: pair each color utility with its dark: twin
  • Animated: add transition + a state variant for motion

cookbook/index|Cookbook index · utilities/index|Utilities reference · patterns/index|Layout patterns