Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Blocks / Authentication

Verify with a code

A six-digit email code step with an expiry timer, a resend countdown ring, helper tips, and a verified state.

bunx --bun @getweini/cli@latest add button card link pin-input separator
Customize
  • The block emits `verify` with the code as soon as the last digit is entered or pasted, and again if the form is submitted. Pass `loading` while you check it, `error` if it is wrong, and `verified` once it passes; the cells turn invalid and the message is announced on error.
  • The hint and error share a reserved two-line message area to keep the code cells and submit button steady. Longer localized messages expand without clipping.
  • The resend button is disabled for `resendSeconds` (default 30) with a countdown ring and a polite live region. It emits `resend` and restarts both timers. `expiresSeconds` (default 600) drives the expiry hint; set it to `0` to hide it.
  • The destination chip emits `change` so people can fix a mistyped address. The verified view emits `continue`. Replace the `#recovery`, `#methods`, and `#back` links with your own routes.
  • All text lives in the `copy` prop, including the destination. On phones the card goes flat so the 48px code cells fit; change `length` to match your backend and use `size="md"` cells for codes longer than six digits.