Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA resend-the-code button that disables itself for a countdown after each press, says how long is left in words, and re-enables itself, with a limit on how many times it can be used. Use this when resending is rate limited.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
People can ask for another email or code and you want to prevent spamming, with a visible and spoken wait time.
Do not use it when: The limit must be enforced on the server too; the countdown only tells people about it.
import { ResendCooldownButton } from "@/components/resend-cooldown-button"<ResendCooldownButton seconds={5} />| Prop | Type | Default | Description |
|---|---|---|---|
onResend | () => Promise<void> | - | Send again. A rejection shows an error and does not use up a send. |
seconds | number | 30 | Cooldown after each send. |
maxSends | number | 3 | Total resends allowed. |
The pattern ships with a Testing Library test (resend-cooldown-button.test.tsx) that covers: its main behaviour, the keyboard path and the error or empty states.