Problem: Async action feedback.
Solution#
<button class="inline-flex items-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-white" disabled>
<span class="size-4 animate-spin rounded-full border-2 border-white/40 border-t-white"></span>
Saving…
</button>Why this works#
Border spinner + disabled state.
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
Related recipes#
cookbook/index|Cookbook index · utilities/index|Utilities reference · patterns/index|Layout patterns
