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 barWhen 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
| Prop | Type | Required | Description |
|---|---|---|---|
open | boolean | Yes | Whether the dialog is shown. |
secondsLeft | number | — | Seconds remaining before automatic logout (you tick this down). |
totalSeconds | number | — | Starting seconds — used to fill the countdown ring. Default 60. |
title | React.ReactNode | — | |
description | React.ReactNode | — | |
extendLabel | React.ReactNode | — | |
logoutLabel | React.ReactNode | — | |
onExtend | () => void | — | Keep the session alive. |
onLogout | () => void | — | Log out immediately. |
className | string | — |