Here's a quick and dirty spinner using Tailwind classes. Many more ways to do this, but this one doesn't need any javascript other than activation, just drop it into the page...
<div class="flex items-center justify-center h-screen">
<div class="spinner-border animate-spin inline-block w-12 h-12 border-4 border-gray-900 rounded-full" role="status">
<span class="bg-white text-white mx-4">Loading...</span>
</div>
</div>