Cards
Copy-paste ready card components for displaying content
Basic Card
Simple card with content
Card Title
This is a basic card with some content. You can put any content inside.
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
<h3 class="text-lg font-medium text-gray-900 mb-2">Card Title</h3>
<p class="text-gray-600">This is a basic card with some content.</p>
</div>
Card with Header
Card with a separate header section
Card Header
This card has a header section with a title.
<div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200 bg-gray-50">
<h3 class="text-lg font-medium text-gray-900">Card Header</h3>
</div>
<div class="px-6 py-4">
<p class="text-gray-600">This card has a header section with a title.</p>
</div>
</div>
Card with Header and Footer
Card with header, body, and footer sections
Card Header
This card has both a header and footer section.
You can put any content in the body area.
Card footer content
<div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200 bg-gray-50">
<h3 class="text-lg font-medium text-gray-900">Card Header</h3>
</div>
<div class="px-6 py-4">
<p class="text-gray-600">This card has both a header and footer section.</p>
</div>
<div class="px-6 py-4 border-t border-gray-200 bg-gray-50">
<p class="text-sm text-gray-500">Card footer content</p>
</div>
</div>
Card with Image
Card with an image at the top
Card with Image
This card includes an image at the top.
<div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<img src="image.jpg" alt="Card image" class="w-full h-48 object-cover">
<div class="px-6 py-4">
<h3 class="text-lg font-medium text-gray-900 mb-2">Card with Image</h3>
<p class="text-gray-600">This card includes an image at the top.</p>
</div>
</div>
Card with Actions
Card with action buttons in the footer
Card with Actions
This card includes action buttons in the footer.
<div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<div class="px-6 py-4">
<h3 class="text-lg font-medium text-gray-900 mb-2">Card with Actions</h3>
<p class="text-gray-600">This card includes action buttons.</p>
</div>
<div class="px-6 py-4 border-t border-gray-200 bg-gray-50 flex justify-end space-x-3">
<button class="px-3 py-2 text-sm text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50">
Cancel
</button>
<button class="px-3 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700">
Save
</button>
</div>
</div>
Card with Badge
Card with a status badge
Card with Badge
NewThis card includes a status badge in the header.
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
<div class="flex items-center justify-between mb-2">
<h3 class="text-lg font-medium text-gray-900">Card with Badge</h3>
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
New
</span>
</div>
<p class="text-gray-600">This card includes a status badge.</p>
</div>
Card with Icon
Card with an icon and stats
Total Sales
$12,345
+12% from last month
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
<div class="flex items-center">
<div class="flex-shrink-0">
<div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center">
<svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"></path>
</svg>
</div>
</div>
<div class="ml-4">
<h3 class="text-sm font-medium text-gray-500">Total Sales</h3>
<p class="text-2xl font-bold text-gray-900">$12,345</p>
<p class="text-sm text-green-600">+12% from last month</p>
</div>
</div>
</div>
Card Grid Layout
Multiple cards in a responsive grid
Feature 1
Description of the first feature.
Feature 2
Description of the second feature.
Feature 3
Description of the third feature.
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
<h3 class="text-lg font-medium text-gray-900 mb-2">Feature 1</h3>
<p class="text-gray-600">Description of the first feature.</p>
</div>
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
<h3 class="text-lg font-medium text-gray-900 mb-2">Feature 2</h3>
<p class="text-gray-600">Description of the second feature.</p>
</div>
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
<h3 class="text-lg font-medium text-gray-900 mb-2">Feature 3</h3>
<p class="text-gray-600">Description of the third feature.</p>
</div>
</div>
Horizontal Card
Card with horizontal layout
Horizontal Card
This card has a horizontal layout with an image on the left.
<div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<div class="flex">
<img src="image.jpg" alt="Card image" class="w-48 h-48 object-cover">
<div class="p-6 flex-1">
<h3 class="text-lg font-medium text-gray-900 mb-2">Horizontal Card</h3>
<p class="text-gray-600 mb-4">This card has a horizontal layout.</p>
<button class="px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700">
Learn More
</button>
</div>
</div>
</div>
Product Card
Card designed for product listings
Product Name
Product Category
<div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<div class="relative">
<img src="product.jpg" alt="Product" class="w-full h-48 object-cover">
<span class="absolute top-2 right-2 px-2 py-1 text-xs font-semibold text-white bg-red-500 rounded">
Sale
</span>
</div>
<div class="p-4">
<h3 class="text-lg font-medium text-gray-900 mb-1">Product Name</h3>
<p class="text-sm text-gray-500 mb-2">Product Category</p>
<div class="flex items-center justify-between">
<div>
<span class="text-xl font-bold text-gray-900">$99.99</span>
<span class="text-sm text-gray-500 line-through ml-2">$149.99</span>
</div>
<button class="px-3 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700">
Add to Cart
</button>
</div>
</div>
</div>
User Profile Card
Card for displaying user information
John Doe
Product Designer
1.2K
Followers
543
Following
89
Posts
<div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
<div class="h-24 bg-gradient-to-r from-blue-500 to-purple-600"></div>
<div class="px-6 pb-6">
<div class="-mt-12 mb-4">
<img src="avatar.jpg" alt="User" class="w-24 h-24 rounded-full border-4 border-white">
</div>
<h3 class="text-xl font-semibold text-gray-900">John Doe</h3>
<p class="text-sm text-gray-500 mb-4">Product Designer</p>
<div class="flex space-x-2 mb-4">
<div class="flex-1 text-center">
<p class="text-lg font-semibold text-gray-900">1.2K</p>
<p class="text-xs text-gray-500">Followers</p>
</div>
<!-- More stats... -->
</div>
<button class="w-full px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700">
Follow
</button>
</div>
</div>