会话超时警报

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

预览

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>

相关组件

会话超时警告

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

打开

会话超时警报组件

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

打开

会话超时警报

一个响应式会话超时警报组件,支持黑暗主题,采用极简/平面美学设计,使用柔和的色彩。它拥有干净的布局,清晰的排版和细微的视觉提示,适合仪表板环境。

打开