一个用于电子商务的简单响应式通知组件,具有 3D 设计元素和大地色调配色方案。支持深色模式。
<div class="p-4 md:p-8 bg-gradient-to-br from-stone-100 to-stone-200 dark:from-stone-800 dark:to-stone-900 min-h-screen flex items-center justify-center"> <div class="max-w-md w-full bg-white dark:bg-stone-700 rounded-lg shadow-xl overflow-hidden transform transition-all duration-300 hover:scale-105"> <div class="p-6 md:p-8 border-b-2 border-stone-200 dark:border-stone-600"> <h2 class="text-2xl md:text-3xl font-bold text-stone-800 dark:text-stone-100 mb-2 drop-shadow-md">Notifications</h2> <p class="text-stone-600 dark:text-stone-300">Stay updated on your recent e-commerce activities.</p> </div> <div class="divide-y divide-stone-200 dark:divide-stone-600"> <!-- Notification Item 1 --> <div class="p-4 md:p-6 flex items-start space-x-4 animate-fade-in-down"> <div class="relative w-12 h-12 rounded-full overflow-hidden shadow-lg transform -rotate-6 transition-all duration-300 hover:rotate-0"> <img class="w-full h-full object-cover" src="https://picsum.photos/seed/product1/50/50" alt="Product Image"> <div class="absolute inset-0 bg-gradient-to-br from-amber-400 to-orange-500 opacity-60"></div> </div> <div class="flex-1"> <p class="text-stone-800 dark:text-stone-100 font-semibold">Order Delivered!</p> <p class="text-sm text-stone-600 dark:text-stone-300 mt-1">Your recent order <span class="font-mono text-xs bg-stone-200 dark:bg-stone-600 px-2 py-1 rounded">#12345</span> has been delivered successfully.</p> <span class="text-xs text-stone-500 dark:text-stone-400 mt-2 block">2 hours ago</span> </div> </div> <!-- Notification Item 2 --> <div class="p-4 md:p-6 flex items-start space-x-4 animate-fade-in-down animation-delay-200"> <div class="relative w-12 h-12 rounded-full overflow-hidden shadow-lg transform rotate-3 transition-all duration-300 hover:rotate-0"> <img class="w-full h-full object-cover" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User Avatar"> <div class="absolute inset-0 bg-gradient-to-br from-green-400 to-emerald-500 opacity-60"></div> </div> <div class="flex-1"> <p class="text-stone-800 dark:text-stone-100 font-semibold">New Message from Seller</p> <p class="text-sm text-stone-600 dark:text-stone-300 mt-1">"Thank you for your purchase! Let us know if you have any questions."</p> <span class="text-xs text-stone-500 dark:text-stone-400 mt-2 block">1 day ago</span> </div> </div> <!-- Notification Item 3 --> <div class="p-4 md:p-6 flex items-start space-x-4 animate-fade-in-down animation-delay-400"> <div class="relative w-12 h-12 rounded-full overflow-hidden shadow-lg transform -rotate-3 transition-all duration-300 hover:rotate-0"> <img class="w-full h-full object-cover" src="https://picsum.photos/seed/promotion/50/50" alt="Promotion Icon"> <div class="absolute inset-0 bg-gradient-to-br from-purple-400 to-indigo-500 opacity-60"></div> </div> <div class="flex-1"> <p class="text-stone-800 dark:text-stone-100 font-semibold">Limited Time Offer!</p> <p class="text-sm text-stone-600 dark:text-stone-300 mt-1">Get <span class="font-extrabold text-lime-600 dark:text-lime-400">20% off</span> on all natural wood items. Shop now!</p> <span class="text-xs text-stone-500 dark:text-stone-400 mt-2 block">3 days ago</span> </div> </div> </div> </div> </div> <style> @keyframes fade-in-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .animate-fade-in-down { animation: fade-in-down 0.5s ease-out forwards; } .animation-delay-200 { animation-delay: 0.2s; } .animation-delay-400 { animation-delay: 0.4s; } </style>
一个复古/老式的通知组件,以土色调设计,具有复杂的交互,以展示作品集。
一个响应式通知组件,具有 Material Design 样式、互补配色方案和深色模式支持,使用 Tailwind CSS 构建,用于仪表板。
Dashboard 支持深色模式的响应式通知组件