Problem: Friendly zero-data screens.

Solution#

html
<div class="grid place-items-center rounded-2xl border border-dashed p-12 text-center">
  <p class="text-4xl">📭</p>
  <h3 class="mt-4 font-semibold">No projects yet</h3>
  <p class="mt-1 text-sm text-slate-500">Create your first project to get started.</p>
  <button class="mt-6 px-4 py-2 bg-blue-600 text-white rounded-lg text-sm">New project</button>
</div>

Why this works#

Dashed border + centered content + one clear action.

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