Skip to content

Instantly share code, notes, and snippets.

@rishimohan
Last active August 10, 2022 10:02
Show Gist options
  • Save rishimohan/aabdfd0e53f50a2ce8097833c966bf28 to your computer and use it in GitHub Desktop.
Save rishimohan/aabdfd0e53f50a2ce8097833c966bf28 to your computer and use it in GitHub Desktop.
Pure Tailwind Animated button
<div class="relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-gradient-to-br from-black to-slate-800 py-6 sm:py-12">
<button class="group relative cursor-default rounded-2xl overflow-hidden bg-gradient-to-b from-gray-800 to-gray-900 px-12 py-5 text-2xl text-white shadow-xl shadow-black/30 ring-1 ring-purple-700 hover:ring-purple-500 duration-200 hover:scale-[0.99]">
<div class="absolute left-[-40px] top-[-110px] h-[300px] w-[300px] animate-[spin_6s_linear_infinite] bg-gradient-to-b from-purple-800 via-[#1c1c1c] to-[#2e1cf1] group-hover:opacity-80 duration-200"></div>
<div class="relative opacity-90 text-purple-200 duration-200">Submit →</span>
</button>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment