Ballmac UI home

Verify 1: one-time code with resend

A code-entry screen: masked email, six slots that accept typing and pasting, automatic submit on the last digit, shake and alert on a wrong code, a resend countdown and an animated success state.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/verify-1

Usage

Example: verify-1-demo.tsx
import { Verify1 } from "@/components/ballmac/blocks/verify-1/verify-1"

/** Type any six digits to succeed, or 000000 to see the wrong-code state. */
export default function Verify1Demo() {
  return <Verify1 />
}

Dependencies

Use with AI

Email or SMS code verification. Pass email, length, onVerify(code) (throw for a wrong code) and onResend. Without onVerify any code except all zeros succeeds, so you can try every state. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Verify 1: one-time code with resend (@ballmac/verify-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Email confirmation after signup
  • Two-factor sign-in and sensitive actions

Not for

  • Magic links that need no typing

Registry JSON: https://ui.ballmac.com/r/verify-1.json

Free to use in personal and commercial projects.