<div class="p-6"> <div class="grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3"> <div class="overflow-hidden rounded-2xl bg-gray-50"> <div class="flex items-center h-[180px] overflow-hidden"> <img src="https://thumbnails.production.thenounproject.com/c4UZhX8RJFowtAoq8OZlUjIFmBg=/fit-in/1000x1000/photos.production.thenounproject.com/photos/D0EE41F3-3CB3-4F1E-B6E5-4CCE5B1DCB17.jpg" alt="Hamburger" /> </div> <div class="p-6"> <div class="flex flex-col items-start justify-between sm:flex-row sm:items-center"> <div> <p class="text-gray-400">Fast Food • Burger</p> <h2 class="mt-2 text-lg font-semibold text-gray-800">Beef Hamburger</h2> </div> <span class="mt-2 inline-block rounded-full bg-orange-400 p-3 text-sm font-medium text-white"> Discount 10% </span> </div> <hr class="mt-4 mb-4" /> <div class="flex flex-wrap justify-between"> <p class="inline-flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 stroke-orange-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> <span class="ml-2 text-gray-600">10 - 15 Mins</span> <span class="mx-2">•</span> <span class="text-gray-400">1Km</span> </p> <p class="inline-flex items-center text-gray-600"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 stroke-yellow-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" /> </svg> <span class="ml-2"> 5.0 (2.5k) </span> </p> </div> </div> </div> <div class="overflow-hidden rounded-2xl bg-gray-50"> <div class="flex items-center h-[180px] overflow-hidden"> <img src="https://thumbnails.production.thenounproject.com/c4UZhX8RJFowtAoq8OZlUjIFmBg=/fit-in/1000x1000/photos.production.thenounproject.com/photos/D0EE41F3-3CB3-4F1E-B6E5-4CCE5B1DCB17.jpg" alt="Hamburger" /> </div> <div class="p-6"> <div class="flex flex-col items-start justify-between sm:flex-row sm:items-center"> <div> <p class="text-gray-400">Fast Food • Burger</p> <h2 class="mt-2 text-lg font-semibold text-gray-800">Beef Hamburger</h2> </div> <span class="mt-2 inline-block rounded-full bg-orange-400 p-3 text-sm font-medium text-white"> Discount 10% </span> </div> <hr class="mt-4 mb-4" /> <div class="flex flex-wrap justify-between"> <p class="inline-flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 stroke-orange-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> <span class="ml-2 text-gray-600">10 - 15 Mins</span> <span class="mx-2">•</span> <span class="text-gray-400">1Km</span> </p> <p class="inline-flex items-center text-gray-600"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 stroke-yellow-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" /> </svg> <span class="ml-2"> 5.0 (2.5k) </span> </p> </div> </div> </div> <div class="overflow-hidden rounded-2xl bg-gray-50"> <div class="flex items-center h-[180px] overflow-hidden"> <img src="https://thumbnails.production.thenounproject.com/c4UZhX8RJFowtAoq8OZlUjIFmBg=/fit-in/1000x1000/photos.production.thenounproject.com/photos/D0EE41F3-3CB3-4F1E-B6E5-4CCE5B1DCB17.jpg" alt="Hamburger" /> </div> <div class="p-6"> <div class="flex flex-col items-start justify-between sm:flex-row sm:items-center"> <div> <p class="text-gray-400">Fast Food • Burger</p> <h2 class="mt-2 text-lg font-semibold text-gray-800">Beef Hamburger</h2> </div> <span class="mt-2 inline-block rounded-full bg-orange-400 p-3 text-sm font-medium text-white"> Discount 10% </span> </div> <hr class="mt-4 mb-4" /> <div class="flex flex-wrap justify-between"> <p class="inline-flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 stroke-orange-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> <span class="ml-2 text-gray-600">10 - 15 Mins</span> <span class="mx-2">•</span> <span class="text-gray-400">1Km</span> </p> <p class="inline-flex items-center text-gray-600"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 stroke-yellow-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" /> </svg> <span class="ml-2"> 5.0 (2.5k) </span> </p> </div> </div> </div> </div> </div>
Tailwind CSS Recipe Card Component
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 Recipe Card Component 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 Card Components
More ComponentsTailwind CSS Card With Image
Tailwind CSS card with image component, useful for showing featured content on a page
Tailwind CSS Hotel Card Component
Tailwind CSS Hotel Card Component
Tailwind CSS Card With Text
Tailwind CSS simple card with a plain text component. Suitable to show simple listing such as blog post.
Tailwind CSS User Card
Tailwind CSS user card component