Problem: Anchor links with offsets.

Solution#

html
<nav class="space-y-1 text-sm">
  <a href="#setup" class="block hover:text-blue-600">Setup</a>
</nav>
<section id="setup" class="scroll-mt-24">…</section>

Why this works#

scroll-mt clears the sticky header for anchors.

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