<div class="flex flex-col"> <h2 class="text-2xl font-bold mb-4"> Buttons with Shadows </h2> <div class="flex flex-wrap gap-4"> <button class="p-4 rounded-lg bg-blue-400 hover:bg-blue-500 font-bold text-white shadow-lg shadow-blue-200 transition ease-in-out duration-200 translate-10"> Primary Button </button> <button class="p-4 rounded-lg bg-green-400 hover:bg-green-500 font-bold text-white shadow-lg shadow-green-200 transition ease-in-out duration-200 translate-10"> Success Button </button> <button class="p-4 rounded-lg bg-yellow-400 hover:bg-yellow-500 font-bold text-white shadow-lg shadow-yellow-200 transition ease-in-out duration-200 translate-10"> Warning Button </button> <button class="p-4 rounded-lg bg-red-400 hover:bg-red-500 font-bold text-white shadow-lg shadow-red-200 transition ease-in-out duration-200 translate-10"> Alert Button </button> <button class="p-4 rounded-lg bg-indigo-400 hover:bg-indigo-500 font-bold text-white shadow-lg shadow-indigo-200 transition ease-in-out duration-200 translate-10"> Secondary Button </button> <button class="p-4 rounded-lg bg-stone-400 hover:bg-stone-500 font-bold text-white shadow-lg shadow-stone-200 transition ease-in-out duration-200 translate-10"> Default Button </button> </div> </div>
Collection of Tailwind CSS Buttons with Shadows for primary, success, warning, alert, secondary and default buttons
How to install and add to your project?
Step 1: Include Scripts and Styling CDN inside the head tag
<script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/charts.css/dist/charts.min.css"> <script defer src="https://unpkg.com/[email protected]/dist/cdn.min.js"></script>
Step 2: Copy the Tailwind CSS Buttons with Shadows component code above as you need it
Step 3: Preview the component in your browser 🚀
Step 4: For production release make sure to use the official Tailwind CSS Installation
You are done 🎉
Credits or Attribution
If you enjoy using our components, please do give us (PostSrc) credit in your project footer section or about page. Copy the HTML below for attribution.
<a href="https://postsrc.com/components" target="_blank" rel="noopener" title="PostSrc Components - Collection of Tailwind CSS components for everyone to use"><img style="width: auto; height: 46px;" src="https://postsrc.com/img/attr.png" alt="PostSrc logo"></a>
Other Tailwind CSS Buttons Components
More ComponentsTailwind CSS Pill Buttons
Collection of Tailwind CSS pill button that includes the typical default button, danger button, warning button, info button, success button, light button, and dark button.
Tailwind CSS Dropdown Button
This component is the implementation of the Tailwind CSS dropdown button. The color can be customized based on the use case of the dropdown button.
Tailwind CSS Button with Icon
Collection of Tailwind CSS Button with icon components, The icon can be placed leading the text or trailing the text.
Tailwind CSS Button Size Variant
Tailwind CSS button size variant component. This variant contains the large, default, and small button sizes.