Skip to content
Sign in
FramesLock screen notificationMenu

Lock screen notificationPro

A phone lock screen with stacked agent notifications that fan out into a list with their actions.

ProAgent notifications land one by one and stack. Tap the stack to fan it out with each notification's actions.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/lock-screen-notification

Usage

tsx
import { LockScreen } from "@/components/ui/chatcn/pro/lock-screen-notification"
import { PhoneFrame, PhoneStatusBar } from "@/components/ui/chatcn/pro/phone-frame"

<PhoneFrame width={320} screenClassName="dark" statusBar={<PhoneStatusBar time="" />}>
  <LockScreen
    time="10:24"
    date="Thursday 29 October"
    wallpaper="/wallpaper.webp"
    notifications={[{ id: "tests", app: "Coding agent", status: "success", time: "now", body: "Tests passed…" }]}
  />
</PhoneFrame>

LockScreen is the screen, not the phone: put it in PhoneFrame with screenClassName="dark" so the status bar and home indicator read on the wallpaper. Everything inside is dark themed, like a lock screen over a photo, on light and dark pages alike. Newest first: the front card is the newest, with up to two edges peeking under it. Tap the stack to open it into a list with each notification's actions.

Cards are a near opaque surface over a darkened wallpaper, with no blur, so they stay crisp and cheap. A status badge on the app tile (green check, red cross, amber alert) always comes with a word for screen readers.

Examples

Open, single and empty

ProThe stack open with every action, a single notification, and a quiet lock screen, on three finishes.

Props

PropTypeNotes
notificationsLockScreenNotificationData[]Newest first
timestringThe clock. Default 10:24
datestringOver the clock
wallpaperstringAn image URL. Without one, a quiet dark ground
expandedbooleanThe open stack. Controlled. defaultExpanded, onExpandedChange
controlsbooleanThe two round buttons at the bottom. Default true

LockScreenNotificationData

FieldTypeNotes
idstring
appstringThe card title, for example Coding agent
iconReactNodeThe tile glyph
status"success" | "error" | "attention"The tile badge
timestringFor example now or 4m ago
bodystringTwo lines when stacked, in full when open
actions{ label, onSelect? }[]Buttons in the open list

Keyboard

KeyAction
Enter / Space on the stackOpens it
TabMoves through the actions, then Show less
Enter on Show lessFolds the stack and returns focus to it

Accessibility

  • The closed stack is one button whose name starts with the front card's text, then how many more are under it.
  • A new notification is announced once in a polite live region, after the first paint.
  • The clock, the wallpaper and the round shortcuts are decorative.

Motion

  • A new notification slides in from above and from 0.96 in 280 ms. The first paint never animates.
  • Opening by pointer fans the cards out with a 30 ms stagger; from the keyboard the list appears at once.
  • Under reduced motion both are opacity only.