Skip to main content

SessionTimeoutDialog

A controlled session-expiry alert dialog with a live countdown ring and stay-signed-in / log-out choices.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

A controlled session-expiry alert dialog with a live countdown ring and stay-signed-in / log-out choices.

Accessibility​

Masked values stay obscured to assistive tech until revealed; the reveal toggle is a labelled button. Audit entries are an ordered list.

Install and import​

npx shadcn@latest add @prism/session-timeout-dialog
import { SessionTimeoutDialog } from '@/components/prism/SessionTimeoutDialog';

In a no-build prototype, read it from the bundle instead: const { SessionTimeoutDialog } = window.PrismDesignSystem_39d121;

Props​

PropTypeRequiredDescription
openbooleanYesWhether the dialog is shown.
secondsLeftnumber—Seconds remaining before automatic logout (you tick this down).
totalSecondsnumber—Starting seconds — used to fill the countdown ring. Default 60.
titleReact.ReactNode—
descriptionReact.ReactNode—
extendLabelReact.ReactNode—
logoutLabelReact.ReactNode—
onExtend() => void—Keep the session alive.
onLogout() => void—Log out immediately.
classNamestring—