One-time code
One-time code and verification blocks for shadcn/ui. OTP inputs for email, SMS and authenticator codes with resend timers, device trust options and backup code fallbacks. Built for shadcn/ui.
Email verification Card for shadcn/ui: logo, "Check your email" title with the masked recipient, a six-slot InputOTP split 3+3 by an InputOTPSeparator, an expiry hint, a "Verify" submit Button and an outline "Resend code (0:29)" Button that stays disabled until a useEffect countdown reaches zero. A "Use a different method" link sits in the CardFooter. The default magic-code screen for sign-in and sign-up.
Two-factor page in shadcn/ui: the left column holds the authenticator form with six evenly spaced InputOTP slots, a pre-checked "Trust this device for 30 days" Checkbox with explanation, a Verify Button and a recovery link, plus a signed-in-as footer. The right bg-muted panel lists other methods (authenticator marked Current with a Badge, text message, backup code, security key) as icon rows inside a RadioGroup, highlighted with a primary ring when selected.
Verification Card for shadcn/ui using Tabs to switch between two methods. Text message shows six numeric, auto-focused InputOTP slots, a Verify Button and a "Call me instead" fallback; Backup code shows a single wide font-mono tracking-widest Input with an xxxx-xxxx-xxxx placeholder, a "7 remaining" note and its own Verify. A MapPin footer reports the device and location. Ideal when SMS is the primary factor but users need an offline escape hatch.
Frequently asked questions
What the One-time code blocks include, how to install them, and which ones are free.
3 One-time code blocks for shadcn/ui:
- Centred email code card with resend countdown
one-time-code-01(free) - Authenticator split with alternative methods
one-time-code-02 - Tabbed text message and backup code
one-time-code-03
Set up the shadcn/ui Pro registry in your project once, as described in Installation, then run npx shadcn@latest add @shadcnpro/aria/one-time-code-01. The block lands in components/blocks/one-time-code-01.tsx together with the shadcn/ui components and npm packages it uses. one-time-code-01 is free, so it installs without a license key.
Yes. Centred email code card with resend countdown (one-time-code-01) is free: the code is shown on this page and it installs without a license key. The other 2 need a shadcn/ui Pro plan, which starts with a 7-day free trial.
Yes. Every One-time code block uses semantic classes such as bg-background, text-muted-foreground and bg-primary, so it picks up your colors, radius and fonts and switches with dark mode. It is responsive from desktop to mobile; the width controls on the preview above let you check.
Yes. Every One-time code block has a matching design in the shadcn/ui Pro Figma kit, so designers and developers work from the same layout. The /generate-code Agent Skill installs the block from the registry when it finds it in a Figma frame, instead of rebuilding it.
Yes. With the shadcn/ui Pro MCP server connected to Cursor, Claude Code or VS Code, describe what you need, for example "Use shadcnpro to add a centred email code card with resend countdown." The agent finds the block with search_blocks, reads its install command and installs it after you approve.