Problem: Comparison frames.

Solution#

html
<div class="grid grid-cols-2 gap-1 rounded-xl overflow-hidden">
  <img class="aspect-video object-cover" src="before.jpg" alt="Before" />
  <img class="aspect-video object-cover" src="after.jpg" alt="After" />
</div>

Why this works#

Two-pane comparison; add labels with absolute chips.

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