组件 会话超时警报 会话超时警报组件

会话超时警报组件

一个极简扁平化设计的会话超时警报组件,采用复古/复古配色方案,具有简单的布局、完全响应能力以及对博客/内容网站的深色模式支持。

预览

HTML 代码

<div class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-gray-500 bg-opacity-60 dark:bg-gray-900 dark:bg-opacity-75 font-sans">
  <div class="w-full max-w-sm p-6 rounded-lg shadow-xl bg-orange-100 dark:bg-stone-800 text-stone-800 dark:text-stone-100 border-t-4 border-orange-500 dark:border-orange-600 transform transition-all duration-300 ease-in-out scale-100 hover:scale-105 hover:shadow-2xl">
    <div class="flex items-center justify-between mb-4">
      <h3 class="text-xl md:text-2xl font-bold text-orange-700 dark:text-orange-400">Session Expiring Soon!</h3>
      <svg class="w-8 h-8 text-orange-600 dark:text-orange-500" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
        <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm-1-8a1 1 0 10-2 0v4a1 1 0 102 0v-4zm-1-3a1 1 0 100 2 1 1 0 000-2z" clip-rule="evenodd"></path>
      </svg>
    </div>
    <p class="text-sm md:text-base mb-6 text-stone-700 dark:text-stone-200 leading-relaxed">
      Your session is about to expire due to inactivity. Please extend your session to continue browsing.
    </p>
    <div class="flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-3">
      <button class="flex-1 px-5 py-2 rounded-md font-semibold text-sm bg-orange-500 hover:bg-orange-600 dark:bg-orange-600 dark:hover:bg-orange-700 text-white shadow-md transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-opacity-75">
        Extend Session
      </button>
      <button class="flex-1 px-5 py-2 rounded-md font-semibold text-sm bg-gray-300 hover:bg-gray-400 dark:bg-stone-700 dark:hover:bg-stone-600 text-stone-700 dark:text-stone-200 shadow-md transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-opacity-75">
        Log Out
      </button>
    </div>
  </div>
</div>

相关组件

会话超时警报

一个用于电子商务网站的简单深色模式会话超时警报组件,使用 TailwindCSS 设计具有柔和的色彩和响应能力。

打开

会话超时警报组件

会话超时警报组件在设计时考虑了微交互,利用灰度配色方案和响应式设计,并支持深色主题。非常适合电子商务平台提醒用户会话过期。

打开

会话超时警告

一个响应式会话超时警报组件,采用3D设计,三元色调,支持暗黑模式,使用Tailwind CSS。

打开