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

会话超时警报组件

一个响应式会话超时警报组件,专为电子商务设计,具有吸引人的动画和黑暗主题。它包含警告消息、倒计时器,以及延长会话或注销的选项。

预览

HTML 代码

<div class="fixed inset-0 flex items-center justify-center z-50 bg-gray-900 bg-opacity-80 dark:bg-opacity-90 transition-all duration-300 ease-in-out">
    <div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 mx-4 w-full max-w-md">
        <h2 class="text-lg font-semibold text-gray-800 dark:text-gray-200 mb-4 animate-bounce">Session Timeout Warning</h2>
        <p class="text-gray-700 dark:text-gray-300 mb-6">Your session is about to expire due to inactivity.</p>
        <div class="flex items-center mb-4">
            <span class="text-2xl font-bold text-gray-800 dark:text-gray-200 mr-2" id="countdown">02:30</span>
            <span class="text-gray-500 dark:text-gray-400">Remaining</span>
        </div>
        <div class="flex justify-between mt-4">
            <button class="bg-blue-500 hover:bg-blue-600 text-white font-semibold py-2 px-4 rounded transition-all duration-200 ease-in-out dark:bg-blue-600 dark:hover:bg-blue-700">Extend Session</button>
            <button class="bg-red-500 hover:bg-red-600 text-white font-semibold py-2 px-4 rounded transition-all duration-200 ease-in-out dark:bg-red-600 dark:hover:bg-red-700">Log Out</button>
        </div>
    </div>
</div>

相关组件

RetroSessionTimeoutAlert

一个复古主题的会话超时警报组件,带有大地色调,专为博客/内容网站设计。具有怀旧外观、响应式设计和深色模式支持。

打开

会话超时警报组件

一个采用粗犷风格设计的会话超时警报组件,具有原始、大胆的美学、高对比度和响应式效果。该组件支持黑暗主题,使用Tailwind CSS样式,并利用picsum.photos和randomuser.me的占位符图像。

打开

会话超时警报组件 - Art Deco Candy 主题

一个简单、响应式的会话超时警报组件,采用装饰艺术风格的设计,使用明亮的糖果色。针对文档/wiki 站点进行了优化,支持深色模式。

打开