组件 错误消息 错误消息组件

错误消息组件

错误消息 用于社交媒体的组件,具有微交互、灰度配色方案、复杂界面、响应式设计和深色主题支持。

预览

HTML 代码

<div class="flex items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-900">
  <div class="relative w-full max-w-md p-6 bg-white rounded-lg shadow-xl dark:bg-gray-800 transform transition-all duration-300 hover:scale-105">
    <div class="absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-gray-400 to-gray-600 rounded-t-lg animate-pulse"></div>
    
    <div class="flex items-center justify-between mb-4 border-b pb-4 border-gray-200 dark:border-gray-700">
      <div class="flex items-center space-x-3">
        <svg class="w-8 h-8 text-gray-600 dark:text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg>
        <h3 class="text-xl font-semibold text-gray-800 dark:text-gray-200">System Error</h3>
      </div>
      <button class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 focus:outline-none transform transition-transform duration-200 hover:rotate-90">
        <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
      </button>
    </div>

    <div class="mb-6">
      <p class="text-gray-600 dark:text-gray-400 leading-relaxed mb-4">An unexpected error occurred. Please try again later or contact support if the issue persists.</p>
      
      <div class="p-3 bg-gray-50 dark:bg-gray-700 rounded-md text-sm text-gray-500 dark:text-gray-300 font-mono overflow-auto max-h-24">
        Error Code: 500 <br>
        Timestamp: 2023-10-27 10:30:45 <br>
        Request ID: abcd-1234-efgh-5678
      </div>
    </div>

    <div class="flex justify-end space-x-3">
      <button class="px-4 py-2 text-sm font-medium text-gray-700 bg-gray-200 rounded-md hover:bg-gray-300 dark:bg-gray-600 dark:text-gray-200 dark:hover:bg-gray-500 transform scale-100 hover:scale-105 transition-transform duration-200">
        Dismiss
      </button>
      <button class="px-4 py-2 text-sm font-medium text-white bg-gray-700 rounded-md hover:bg-gray-800 dark:bg-gray-500 dark:hover:bg-gray-400 transform scale-100 hover:scale-105 transition-transform duration-200">
        Report Issue
      </button>
    </div>

    <div class="absolute bottom-0 left-0 w-full h-1 bg-gradient-to-r from-gray-600 to-gray-400 rounded-b-lg animate-pulse-slow"></div>

  </div>
</div>

<style>
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
  }
  .animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
  .animate-pulse-slow { animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
</style>

相关组件

错误信息组件

一个采用野兽派风格、使用 Tailwind CSS 设计的响应式错误消息组件,具有高对比、独特布局和暗模式支持。

打开

错误消息组件

一个玻璃摩尔主义风格的错误信息组件,具有商务使用的深色主题。它使用Tailwind CSS进行样式设计,具有响应式设计和互动元素。

打开

错误消息组件

一种玻璃风格的错误消息组件,适用于仪表板,具有磨砂玻璃效果、互补色以及适合数据可视化和控制面板的复杂交互设计。

打开