Recovery Contact Cooldown

Recovery Contact Cooldown is a copy-paste React component that stops helps the owner catch a swapped recovery contact before it takes effect before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/recovery-contact-cooldown
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsHelps the owner catch a swapped recovery contact before it takes effect

Was this component page useful?

How do I install Recovery Contact Cooldown?

pnpm dlx shadcn@latest add @bollard/recovery-contact-cooldown

The files land in your project. They're yours to edit.

How do I use Recovery Contact Cooldown in React?

recovery-contact-cooldown-usage.tsx
import { RecoveryContactCooldown } from "@/components/ui/recovery-contact-cooldown"

<RecoveryContactCooldown
  key={run}
  previous="tushar.k@gmail.com"
  next="recover.acct77@proton.me"
  requestedAt={requestedAt}
  onCancel={() => new Promise((resolve) => setTimeout(resolve, 600))}
  onReport={() => {}}
/>

What input mistakes does Recovery Contact Cooldown catch?

  • A recovery email or phone change that hasn't taken effect yet
  • Masked old and new contacts so the owner can recognise them
  • Time left, turning urgent in the final hour
  • One-tap cancel and a "this wasn't me" path
  • Says the old contact was notified only when previousNotified is true

What props does Recovery Contact Cooldown accept?

RecoveryContactCooldown props
PropTypeDefault
kind

Which recovery method is changing.

"email" | "phone""email"
previous

The current contact, which keeps working during the hold.

string—
next* (required)

The contact it is changing to.

string—
previousNotified

Whether the old contact was sent a notice about the change. Turn off if your backend doesn't send one, so the card never claims it did.

booleantrue
mask

Mask both contacts (t•••r@gmail.com).

booleantrue
requestedAt

When the change was requested.

DateInput—
effectiveAt

When it takes effect. Defaults to requestedAt + delayHours.

DateInput—
delayHours

Length of the hold in hours, when effectiveAt isn't given.

number48
now

A fixed clock, for tests and server rendering. Ticks every second when omitted.

DateInput—
status

Controlled status. Pending turns into applied by itself when the time is up.

RecoveryCooldownStatus—
defaultStatus

Starting status when uncontrolled.

RecoveryCooldownStatus"pending"
onStatusChange

Called when the status changes (cancelled, applied).

(status: RecoveryCooldownStatus) => void—
onCancel

Cancels the change on the server. May return a Promise; a rejection shows an error.

() => void | Promise<void>—
onReport

"This wasn't me": start securing the account (new password, sign out everywhere).

() => void—
onElapsed

Called once when the hold ends and the change takes effect.

() => void—
formatWhen

Formats the effective time.

(date: Date) => string(date) => date.toLocaleString(undefined, { weekday: "shor…
messages

Override any visible or announced text.

Partial<RecoveryCooldownMessages>—

* required. Also accepts the native props of <section> (className, aria-*, data-*…), passed through to it.

How is Recovery Contact Cooldown accessible?

  • Section labelled by its title; countdown is role=timer and is not announced every second
  • Only the outcome (applied) is announced via a polite sr-only region
  • Cancel errors show role=alert text
  • After cancel or apply, focus moves to the result message
  • Urgency shown with text and colour

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: The backend must hold the change, keep the old contact working, notify it, and accept cancellation; this card only surfaces that state.

  • Displays the hold; it does not create or enforce it
  • Pending turns to applied on the client clock unless you pass now/status from the server
  • Masking is cosmetic; the full values still reach the browser

What expensive mistakes does Recovery Contact Cooldown stop?

Helps the owner catch a swapped recovery contact before it takes effect

Also known as

recovery email · recovery phone · security hold · account recovery · change email · mobile number · +91 · this wasn't me

Field type

What dependencies does Recovery Contact Cooldown require?

Recovery Contact Cooldown facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameRecovery Contact Cooldown
Registry identifier@bollard/recovery-contact-cooldown
Install commandnpx shadcn@latest add @bollard/recovery-contact-cooldown
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Recovery Contact Cooldown

How does Recovery Contact Cooldown protect destructive mutations?

Recovery Contact Cooldown prevents helps the owner catch a swapped recovery contact before it takes effect. Enforces deliberate friction against A recovery email or phone change that hasn't taken effect yet, Masked old and new contacts so the owner can recognise them, Time left, turning urgent in the final hour, One-tap cancel and a "this wasn't me" path, Says the old contact was notified only when previousNotified is true. Limitation: authorize recovery-contact-cooldown mutations on the server.

How do I install recovery-contact-cooldown with shadcn?

Run `npx shadcn@latest add @bollard/recovery-contact-cooldown`. Sources added: registry/default/recovery-contact-cooldown/recovery-contact-cooldown.tsx. Package requirements: lucide-react.

What props customize Recovery Contact Cooldown?

Recovery Contact Cooldown accepts `kind`, `previous`, `next`, `previousNotified`, `mask`. Configures recovery email, recovery phone, security hold behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of recovery-contact-cooldown?

Displays the hold; it does not create or enforce it. Pending turns to applied on the client clock unless you pass now/status from the server. Masking is cosmetic; the full values still reach the browser Server requirement: The backend must hold the change, keep the old contact working, notify it, and accept cancellation; this card only surfaces that state.

How does Recovery Contact Cooldown meet accessibility guidelines?

Section labelled by its title; countdown is role=timer and is not announced every second. Only the outcome (applied) is announced via a polite sr-only region. Cancel errors show role=alert text. After cancel or apply, focus moves to the result message. Urgency shown with text and colour. Minimizes errors: attacker changed recovery email, recovery phone changed without me.

Which components pair with Recovery Contact Cooldown?