会话超时警报

会话超时警告组件,采用微交互风格,支持响应效果和暗主题。

预览

HTML 代码

<div class="fixed inset-0 z-50 flex items-center justify-center p-4">
    <div class="relative w-full max-w-md p-6 bg-white rounded-lg shadow-lg dark:bg-gray-800">
        <div class="flex items-center justify-between">
            <h3 class="text-lg font-semibold text-gray-900 dark:text-white">Session Timeout</h3>
            <button class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 focus:outline-none">
                <svg class="w-5 h-5" 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="mt-4">
            <p class="text-sm text-gray-500 dark:text-gray-300">Your session is about to expire. You will be logged out automatically soon.</p>
            <div class="mt-4 flex items-center justify-between">
                <span class="text-sm font-semibold text-gray-900 dark:text-white">Time remaining:</span>
                <span class="text-sm font-mono text-red-600 dark:text-red-400 animation-pulse">0:59</span>
            </div>
        </div>
        <div class="mt-6 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 focus:outline-none dark:text-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600">Cancel</button>
            <button class="px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:outline-none">Extend Session</button>
        </div>
    </div>
</div>

相关组件

会话超时警报

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

打开

会话超时警报组件

适用于市场平台的野兽派风格、充满活力且响应迅速的会话超时警报组件,支持深色模式。

打开

会话超时警报组件

用于电子商务的复杂 Neumorphic 风格会话超时警报组件,具有单色配色方案和响应式设计,支持深色模式。

打开