Session Timeout

A session-expiry pill with a draining time bar; one tap keeps you signed in with a springy confirm.

Session expiring0:12

Build a session-timeout warning card. Structure: a light card with a clock icon, the title "Session expiring", a monospace countdown like "0:12" on the right (tabular numbers so it never jitters), a thin 4px time bar under them, and a full-width dark pill button "Stay signed in". Countdown: ticks down one second at a time from 0:12. The time bar's width tracks the remaining time, animating linearly so the drain looks continuous rather than steppy. Bar and timer are accent-colored while calm. Urgency: at 4 seconds and below, the timer, bar and card border all shift to the semantic red (0.4s ease), and the whole card does a tiny shiver - x offsets [0,-2,2,-1,0] over 0.5s, repeating with a 1.2s pause - anxious, not violent. At 0:00 the title becomes "Signed out" and the button label "Sign back in". Rescue: clicking the button resets the clock to 0:12 and flips the button green for 1.6 seconds with the label "You're good" plus a check - the label swap is a vertical roll (old text slides up and out, new springs in from below). Then it returns to "Stay signed in". Accessibility: the timer has aria-live="polite"; the shiver and roll are skipped under prefers-reduced-motion (the countdown itself may simply not run there - the states still work on click). Colors as tokens: paper, ink, one accent, semantic red for urgency and green for the confirm. Build the component, not this demo of it. - Ambient motion that IS the component may loop: a drifting background, a marquee, a spinner while something is genuinely loading. - Do not add any timer, interval, loop or script that performs a person's action by itself. No auto-hover, no auto-click, no cycling through states, no pretend submitting, no replaying the interaction on a schedule. - Every state that answers a person waits for a real event from that person. - Placeholder copy and sample content are welcome. Simulated behaviour is not.

Rate it
1
0

We'd like to measure how the site gets used, with Google Analytics. It sets cookies. Everything the site needs to work runs either way. How we handle data