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

错误消息组件

此组件显示错误消息,并具有与用户操作响应的迷人动画。它支持黑暗模式,并使用 Tailwind CSS 具有响应式效果。

预览

HTML 代码

<div class="flex flex-col items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-800">
  <div class="max-w-md w-full bg-white dark:bg-gray-900 shadow-lg rounded-lg p-6 transition duration-300 hover:shadow-xl transform hover:-translate-y-1">
    <div class="flex items-center mb-4">
      <img class="w-12 h-12 rounded-full mr-4" src="https://randomuser.me/api/portraits/men/10.jpg" alt="Avatar">
      <h2 class="text-lg font-semibold text-gray-800 dark:text-gray-200">Error Title</h2>
    </div>
    <p class="text-gray-600 dark:text-gray-400 mb-4">
      This is an error message that explains what went wrong. Please check your input and try again.
    </p>
    <div class="flex items-center justify-between mt-4">
      <button class="px-4 py-2 bg-blue-500 text-white font-semibold rounded-md hover:bg-blue-600 transition duration-200 dark:bg-blue-700 dark:hover:bg-blue-800">Retry</button>
      <button class="px-4 py-2 bg-red-500 text-white font-semibold rounded-md hover:bg-red-600 transition duration-200 dark:bg-red-700 dark:hover:bg-red-800">Cancel</button>
    </div>
    <img class="mt-4 w-full h-32 object-cover rounded" src="https://picsum.photos/400/200?random=1" alt="Error Illustration">
  </div>
</div>

相关组件

错误信息组件

一个使用 Tailwind CSS 设计的响应式错误信息组件,具有吸引用户互动的动画,并支持深色主题。

打开

错误消息组件

一个响应式错误消息组件,专为具有单色配色方案的深色模式而设计。它旨在使仪表板可视化错误或警告,其中包含交互式元素,例如关闭按钮和错误图标。

打开

错误消息组件

具有3D设计的错误消息组件,单色配色方案,适中复杂度用于仪表板目的,响应式设计并支持深色主题。

打开