Problem: Tables on phones.

Solution#

html
<div class="overflow-x-auto">
  <table class="min-w-full text-sm">…</table>
</div>

Why this works#

overflow-x-auto + min-w-full = horizontal scroll instead of squashed columns.

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