<div class="border overflow-hidden">
  <label>
    <input type="checkbox" class="hidden peer" />
    <p class="cursor-pointer">click me</p>
    <div class="bg-gray-400 max-h-0 peer-checked:max-h-screen">show me</div>
  </label>
</div>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdn.tailwindcss.com