Session Expired Sign In
A full-height session-timeout screen: an accent headline over an account strip showing an initials avatar, the signed-out email address, and the time it happened, an autosave-reassurance line, and a Sign in button beside a Switch account link.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, avatar, avatar-initials dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/session-expired-sign-in.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/error/error27.tsx instead.
Usage
The file also exports error27Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Error27, error27Demo } from "@/components/blocks/error/error27"; export default function Page() { return <Error27 {...error27Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | ReactNode | none | Main headline, can include an inline accent span. |
| description | string | none | Supporting copy under the headline. |
| name | string | none | Full name used to derive the initials shown in the avatar. |
| string | none | Email address of the signed-out account. | |
| signedOutAt | string | none | Human-readable time the session ended, e.g. "4:12 PM". |
| autosaveMessage | string | none | Reassurance line confirming unsaved work was preserved. |
| signInLabel | string | none | Label for the primary sign-in button. |
| signInHref | string | none | Href for the primary sign-in button. |
| switchAccountLabel | string | none | Label for the switch-account link. |
| switchAccountHref | string | none | Href for the switch-account link. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- Fully static server component: no client state, hooks, or interactivity of any kind.
- signedOutAt is a plain string prop supplied by the caller (e.g. "4:12 PM"), not computed from new Date() at render time, so the block stays hydration-safe and identical across every render.
- Sign in and Switch account both render as real Next.js Link components via the Button's render prop, but neither performs a real authentication flow.
More Error Blocks
View all →centered-404-message
Centered 404 Message
Minimal centered 404 with two CTAs and a divided row of popular page links.
404-with-site-search
404 With Site Search
404 screen with a working search box and a bordered list of suggested pages.
split-404-with-image
Split 404 With Image
Two-column 404 with the message on one side and a full-bleed photo that scales on hover on the other.
404-with-destination-cards
404 With Destination Cards
404 screen with a grid of icon destination cards plus fallback CTA buttons.
404-support-panel
404 Support Panel
Card-style 404 echoing the requested URL, with a real back button and a support/status link row.
inline-404-line
Inline 404 Line
The smallest possible 404: code and message on one divided line with one button underneath.