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

错误信息组件

Retro/Vintage 错误消息组件,具有柔和的配色方案、复杂的布局、响应式设计和使用 Tailwind CSS 的深色主题支持。

预览

HTML 代码

<div class="relative min-h-screen flex items-center justify-center bg-gray-100 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8">
  <div class="relative bg-white dark:bg-gray-800 p-10 rounded-lg shadow-xl transform transition-all sm:w-full sm:max-w-md">
    <div class="absolute top-0 right-0 -mt-4 -mr-4">
      <svg class="h-12 w-12 text-red-500 dark:text-red-400 transform rotate-12" fill="none" viewBox="0 0 24 24" stroke="currentColor">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
      </svg>
    </div>
    <div class="text-center">
      <h2 class="mt-6 text-3xl font-bold text-gray-900 dark:text-white font-display">
        Oops!
      </h2>
      <p class="mt-2 text-sm text-gray-600 dark:text-gray-300 font-body">
        Looks like something went wrong.
      </p>
    </div>
    <div class="mt-6">
      <div class="rounded-md bg-red-50 dark:bg-red-900 p-4">
        <div class="flex">
          <div class="flex-shrink-0">
            <svg class="h-5 w-5 text-red-400 dark:text-red-600" viewBox="0 0 20 20" fill="currentColor">
              <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/>
            </svg>
          </div>
          <div class="ml-3">
            <h3 class="text-sm font-medium text-red-800 dark:text-red-200">
              We encountered an error.
            </h3>
            <div class="mt-2 text-sm text-red-700 dark:text-red-300">
              <ul role="list" class="list-disc pl-5 space-y-1">
                <li>
                  Please try again in a few minutes.
                </li>
                <li>
                  If the issue persists, contact support.
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="mt-6 text-center">
      <a href="#" class="font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300 font-body">
        Go back home
      </a>
    </div>
  </div>
</div>

相关组件

错误消息组件

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

打开

错误消息组件

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

打开

错误信息组件

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

打开