Problem: Square accessible icon buttons.

Solution#

html
<button class="grid size-10 place-items-center rounded-lg hover:bg-slate-100" aria-label="Settings">⚙</button>

Why this works#

size-10 + place-items-center + aria-label.

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