Neumorphism Grid Layout Component
Neumorphism Grid Layout Component
HTML Code
<div class="min-h-screen bg-gray-200 dark:bg-gray-800 p-8 flex items-center justify-center">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Card 1 -->
<div class="rounded-xl shadow-neumorphic-light dark:shadow-neumorphic-dark bg-gray-200 dark:bg-gray-700 p-6 transform hover:scale-105 transition duration-300">
<img src="https://picsum.photos/400/200?random=1" alt="Image 1" class="rounded-lg mb-4 shadow-inner-neumorphic-light dark:shadow-inner-neumorphic-dark">
<h3 class="text-xl font-semibold text-gray-800 dark:text-gray-100 mb-2">Post Title 1</h3>
<p class="text-gray-600 dark:text-gray-300 text-sm">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<div class="flex items-center mt-4">
<img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar" class="w-8 h-8 rounded-full shadow-neumorphic-light dark:shadow-neumorphic-dark mr-3">
<span class="text-gray-700 dark:text-gray-200 text-sm">John Doe</span>
</div>
</div>
<!-- Card 2 -->
<div class="rounded-xl shadow-neumorphic-light dark:shadow-neumorphic-dark bg-gray-200 dark:bg-gray-700 p-6 transform hover:scale-105 transition duration-300">
<img src="https://picsum.photos/400/200?random=2" alt="Image 2" class="rounded-lg mb-4 shadow-inner-neumorphic-light dark:shadow-inner-neumorphic-dark">
<h3 class="text-xl font-semibold text-gray-800 dark:text-gray-100 mb-2">Post Title 2</h3>
<p class="text-gray-600 dark:text-gray-300 text-sm">Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<div class="flex items-center mt-4">
<img src="https://randomuser.me/api/portraits/women/2.jpg" alt="Avatar" class="w-8 h-8 rounded-full shadow-neumorphic-light dark:shadow-neumorphic-dark mr-3">
<span class="text-gray-700 dark:text-gray-200 text-sm">Jane Smith</span>
</div>
</div>
<!-- Card 3 -->
<div class="rounded-xl shadow-neumorphic-light dark:shadow-neumorphic-dark bg-gray-200 dark:bg-gray-700 p-6 transform hover:scale-105 transition duration-300">
<img src="https://picsum.photos/400/200?random=3" alt="Image 3" class="rounded-lg mb-4 shadow-inner-neumorphic-light dark:shadow-inner-neumorphic-dark">
<h3 class="text-xl font-semibold text-gray-800 dark:text-gray-100 mb-2">Post Title 3</h3>
<p class="text-gray-600 dark:text-gray-300 text-sm">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
<div class="flex items-center mt-4">
<img src="https://randomuser.me/api/portraits/men/3.jpg" alt="Avatar" class="w-8 h-8 rounded-full shadow-neumorphic-light dark:shadow-neumorphic-dark mr-3">
<span class="text-gray-700 dark:text-gray-200 text-sm">Peter Jones</span>
</div>
</div>
</div>
<!-- You'll need to extend your tailwind.config.js to include neumorphic shadows like this: -->
<!--
module.exports = {
darkMode: 'class',
theme: {
extend: {
boxShadow: {
'neumorphic-light': '9px 9px 18px #a1a1a1, -9px -9px 18px #ffffff',
'neumorphic-dark': '9px 9px 18px #4a4a4a, -9px -9px 18px #000000',
'inner-neumorphic-light': 'inset 5px 5px 10px #a1a1a1, inset -5px -5px 10px #ffffff',
'inner-neumorphic-dark': 'inset 5px 5px 10px #4a4a4a, inset -5px -5px 10px #000000',
}
},
},
plugins: [],
}
-->
</div>
Related Components
Skeuomorphism Grid Layout Component
Skeuomorphism Grid Layout Component with responsive effects and dark theme support.
Skeuomorphism Vibrant Grid Layout
Responsive Grid Layout Component with dark mode support, Skeuomorphism design, Vibrant colors, Moderate complexity, suitable for Portfolios.
Grid Layout Component 29
A responsive grid layout component designed in a brutalist style with high contrast and unusual layouts, supporting dark mode with Tailwind CSS.