Eidetic

Escalation Timer

Workflow

Visual countdown for deadlines with automatic escalation and notification tracking. Features pause/resume controls, threshold markers, and color-coded urgency states.

Preview

Timer with escalation info and notification badges

48h 0m remaining
40% of deadline
0%75%90%100%
Escalates to Olivia Chen (Manager escalation) in 24h 0m
50% alert
75% alert
90% alert

Status States

Timer states based on urgency level

Normal

96h 0m remaining
80% of deadline
0%75%90%100%
Escalates to Priya Sharma (Reminder) in 48h 0m

Warning

24h 0m remaining
20% of deadline
0%75%90%100%
Escalates to Olivia Chen (Manager escalation) in 0m

Critical

7h 12m remaining
6% of deadline
0%75%90%100%
Escalates to Marcus Johnson (Auto-reassign) in 7h 12m

Expired

Time Expired
Escalation triggered
0%75%90%100%

Sizes

Small, medium, and large variants

Small

36h 0m remaining
50% of deadline
0%75%90%100%

Medium (default)

36h 0m remaining
50% of deadline
0%75%90%100%

Large

36h 0m remaining
50% of deadline
0%75%90%100%

Props

EscalationTimer component API reference

PropTypeDefaultDescription
deadlinenumberTotal deadline in the specified unit
elapsednumberElapsed time in the specified unit
unit'minutes' | 'hours' | 'days''hours'Time unit for deadline and elapsed values
warningThresholdnumber0.75Percentage at which warning state begins (0-1)
criticalThresholdnumber0.9Percentage at which critical state begins (0-1)
nextEscalationNextEscalation | nullNext escalation target info
notificationsNotification[][]Array of notification checkpoints
pausablebooleantrueShow pause/resume button
isPausedbooleanfalseWhether timer is currently paused
onPause() => voidCallback when pause button is clicked
onResume() => voidCallback when resume button is clicked
size'sm' | 'md' | 'lg''md'Size variant

NextEscalation Type

PropTypeDefaultDescription
name*stringEscalation recipient name
level*stringEscalation level description
triggerAt*numberMinutes at which escalation triggers

Notification Type

PropTypeDefaultDescription
at*numberPercentage threshold (0-1)
sent*booleanWhether notification was sent

Usage

Import and implementation example

import { EscalationTimer } from '@/components/ui/escalation-timer'
export default function Example() {
const [isPaused, setIsPaused] = useState(false)
return (
<EscalationTimer
deadline={5}
elapsed={3.5}
unit="days"
warningThreshold={0.75}
criticalThreshold={0.9}
nextEscalation={{
level: 'Manager',
name: 'Olivia Chen',
triggerAt: 96 * 60
}}
notifications={[
{ at: 0.5, sent: true },
{ at: 0.75, sent: false },
{ at: 0.9, sent: false }
]}
isPaused={isPaused}
onPause={() => setIsPaused(true)}
onResume={() => setIsPaused(false)}
/>
)
}

Features

Built-in functionality

  • Flexible time units: Minutes, hours, or days
  • Visual countdown: Time remaining display with progress bar
  • Color-coded urgency: Normal (emerald), warning (amber), critical (rose), expired
  • Threshold markers: Configurable warning and critical thresholds
  • Escalation preview: Next step with recipient information
  • Notification badges: Track sent/pending notifications at checkpoints
  • Pause/resume: Optional timer controls for manual intervention
  • Dark mode: Full dark mode support

Accessibility

Accessibility considerations

ARIA Attributes

Pause/resume button is a native button elementTime remaining is displayed as visible textStatus is communicated through icon and text

Keyboard Navigation

KeyAction
TabFocus pause/resume button
Enter / SpaceToggle pause/resume state

Notes

  • Time remaining shown numerically, not just visually
  • Status labels (remaining %, expired) provide context
  • Color indicates urgency but text provides primary info
  • Consider aria-live for countdown updates