Problem: Floating return button.

Solution#

html
<a href="#top" class="fixed bottom-6 right-6 grid size-11 place-items-center rounded-full bg-slate-900 text-white shadow-lg hover:-translate-y-1 transition">↑</a>

Why this works#

Fixed circle + lift on hover.

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