BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/freddy/auth-11

auth-11

freddy/auth-11
FreeBlock

Multi-input OTP/Magic Link verification form.

Install it

npx shadcn@latest add https://ui.arkcabin.com/r/auth-11.json

Source

registry/blocks/auth/11/otp-form.tsxui.arkcabin.com/r/auth-11.json
1"use client";
2
3import { ArrowLeft, MailIcon } from "lucide-react";
4import type React from "react";
5import { useRef, useState } from "react";
6import { Button } from "@/components/ui/button";
7import { Input } from "@/components/ui/input";
8
9const DIGIT_REGEX = /^\d*$/;
10const OTP_FIELDS = [0, 1, 2, 3, 4, 5];
11
12export function OtpForm() {
13 const [otp, setOtp] = useState(["", "", "", "", "", ""]);
14 const inputRefs = useRef<(HTMLInputElement | null)[]>([]);
15
16 const handleChange = (index: number, value: string) => {
17 let newValue = value;
18 if (newValue.length > 1) {
19 newValue = newValue.slice(-1);
20 }
21 if (!DIGIT_REGEX.test(newValue)) {
22 return;
23 }
24
25 const newOtp = [...otp];
26 newOtp[index] = newValue;
27 setOtp(newOtp);
28
29 // Move to next input if value is entered
30 if (newValue && index < 5) {
31 inputRefs.current[index + 1]?.focus();
32 }
33 };
34
35 const handleKeyDown = (
36 index: number,
37 e: React.KeyboardEvent<HTMLInputElement>
38 ) => {
39 if (e.key === "Backspace" && !otp[index] && index > 0) {
40 inputRefs.current[index - 1]?.focus();
41 }
42 };
43
44 return (
45 <div className="flex h-screen w-full items-center justify-center bg-background px-6 py-12">
46 <div className="w-full max-w-[440px] space-y-12 text-center">
47 <div className="flex flex-col items-center space-y-8">
48 <div className="relative">
49 <div className="flex size-20 items-center justify-center rounded-[2.5rem] bg-primary/5 text-primary shadow-sm ring-1 ring-primary/10 transition-transform duration-500 hover:scale-105">
50 <MailIcon className="size-10" />
51 </div>
52 <div className="-right-1 -top-1 absolute flex size-6 items-center justify-center rounded-full border-4 border-background bg-primary shadow-lg shadow-primary/20">
53 <span className="size-1.5 animate-pulse rounded-full bg-white" />
54 </div>
55 </div>
56
57 <div className="space-y-4">
58 <h1 className="font-bold text-4xl tracking-tightest sm:text-5xl">
59 Verify email
60 </h1>
61 <p className="mx-auto max-w-sm font-medium text-lg text-muted-foreground leading-relaxed">
62 We've sent a 6-digit verification code to
63 <span className="mt-1 block font-bold text-foreground">
64 v***k@example.com
65 </span>
66 </p>
67 </div>
68 </div>
69
70 <div className="space-y-10">
71// … truncated

What it pulls in

Other registry items

  • button
  • input

Files it writes

  • registry/blocks/auth/11/otp-form.tsx

Facts

Registry
freddy
Type
registry:block
Access
Free
Files written
1
Licence
NOASSERTION
First indexed
2026-08-04
Last confirmed
today

Go to the source

ui.arkcabin.com arkcabin/freddy-ui on GitHub Raw registry item This item as JSON

More from freddy

All 60 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
announcement-1announcement-1freddyBlocksFree1 dep
announcement-2announcement-2freddyBlocksFree1 dep
announcement-3announcement-3freddyBlocksFree1 dep
auth-1auth-1freddyBlocksFreeno deps · 2 files
auth-10auth-10freddyBlocksFreeno deps
auth-12auth-12freddyBlocksFreeno deps
auth-2auth-2freddyBlocksFree1 dep · 3 files
auth-3auth-3freddyBlocksFreeno deps · 2 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex